open-index/open-npm huggingface dataset:
npm package: @quadrato/binutils-hiperf
Description: A high performance version of node-binutils with typescript support.
Author: Orfeas Zafeiris
Latest version: 0.1.2

binutils-hiperf
==============================================================

This is a fork of the high performance version of OrfeasZ's package [node-binutils-hiperf](https://github.com/OrfeasZ/node-binutils-hiperf) with added typescript definitions.

To install using npm open your terminal (or command line), make sure you're in your application directory and execute the following command:

    npm install @quadrato/binutils-hiperf
    
You can then start using the package by requiring it from your application as such:

    var binutils = require('@quadrato/binutils-hiperf');

For usage and examples please refer to the page of the original [node-binutils](https://github.com/OrfeasZ/node-binutils) package.
npm package: @quadrel-enterprise-ui/alarm
Description: Library for playing alarm sounds, for example to draw attention to an application or notification
Latest version: 20.0.1

# qd-alarm

Plays audio alarms (`beep`, `ship-horn`) in Angular applications.

## Setup

```typescript
@NgModule({
  imports: [QdAlarmModule]
})
```

## API

### `play(type, duration?)`

Plays a sound once. With `duration` (ms) it loops and stops automatically.

```typescript
alarmService.play('beep');               // plays once
alarmService.play('ship-horn', 5000);    // loops, stops after 5 s
```

### `playUntilPaused(type)`

Loops until manually paused.

```typescript
const audio = alarmService.playUntilPaused('beep');

audio.pause(); // stop
```
npm package: @quadrel-enterprise-ui/language
Description: Library for loading dynamic and static translation files
Latest version: 20.0.1

# qd-language

`TranslateLoader` for `@ngx-translate/core`. Loads translations from static JSON files and optionally from Weblate in dev environments.

## Setup

```typescript
@NgModule({
  imports: [
    QdLanguageModule,
    TranslateModule.forRoot({
      loader: { provide: TranslateLoader, useExisting: QdLanguageService }
    })
  ],
  providers: [
    {
      provide: TRANSLATION_RESOURCES,
      useValue: [{ prefix: '/assets/i18n/' }]  // loads /assets/i18n/{lang}.json
    }
  ]
})
```

## With Weblate (dev environments)

Weblate translations are fetched when the PAMS config endpoint returns `pamsEnvironment: 'dev'`. In all other environments only static files are loaded.

```typescript
providers: [
  {
    provide: TRANSLATION_RESOURCES,
    useValue: [{ prefix: '/assets/i18n/' }]
  },
  {
    provide: WEBLATE_RESOURCES,
    useValue: [{ project: 'my-project', component: 'my-component' }]
  },
  {
    provide: LANGUAGE_ENVIRONMENT,
    useValue: {
      BACKEND_SERVICE_API: 'https://my-api/',
      CONFIGURATION_PATH: 'config'
    }
  }
]
```

## Static resource options

| Option | Description | Default |
|---|---|---|
| `prefix` | Path prefix | — |
| `suffix` | File extension | `.json` |
npm package: @quadrel-enterprise-ui/page-leave-handler
Description: Small library for handling the page leave event
Latest version: 19.0.16

<img src="https://confluence.bit.admin.ch/download/attachments/268095262/image2020-9-11_14-33-29.png" width="500">

---

# Quadrel Services - Package for handling the page leave event

## Build

Run `nx build qd-page-leave-handler` to build the project. The build artifacts will be stored in the `dist/libs/qd-page-leave-handler` directory. Use `--configuration production` for a production build.

## Developement

Run `npm run start` or `nx serve` to start the test app for development. The test app integrates all libraries of the monorepo.

## Running unit tests

Run `nx test qd-page-leave-handler` to execute the unit tests.

## Release

Releases can be made on a release branch with the following commands:

Run `nx release-patch qd-page-leave-handler` to create a patch release.

Run `nx release-minor qd-page-leave-handler` to create a minor release.

Run `nx release-major qd-page-leave-handler` to create a major release.

Run `nx prerelease qd-page-leave-handler` to create a beta release.

Run `nx premajor qd-page-leave-handler` to create a beta major release.

## Usage

### Install the package

Run `npm i -D @quadrel-services/qd-page-leave-handler` to add the package in the dependencies.

### In your app.module

```javascript
import { QdPageLeaveHandlerModule } from '@quadrel-services/qd-page-leave-handler';

...

@NgModule({
    ...
    imports: [
        ...
        QdPageLeaveHandlerModule
    ],
    ...
})
```

### In your template

```html
<qd-page-leave-handler [callBeforeLeaving]="myCallback">
  <p>some optional markup</p>
</qd-page-leave-handler>
```
npm package: @quadrel-enterprise-ui/persistence
Description: Library for the persistence of data
Latest version: 20.0.1

# qd-persistence

Cookie-based key-value persistence for Angular. Cookies are stored under `.bazg.admin.ch` (or `localhost` in development).

## Scopes

| Scope | Cookie name |
|---|---|
| `bazg` (default) | `QD-BAZG` |
| `application` | `QD-APPLICATION_{appId}` |
| `private` | `QD-PRIVATE_{appId}_{frontendId}` |

## Setup

```typescript
@NgModule({
  imports: [
    QdPersistenceModule.forRoot({
      applicationIdentifier: 'my-app',
      frontendIdentifier: 'my-frontend'
    })
  ]
})
```

## API

```typescript
persistence.write('theme', 'dark');
persistence.read<string>('theme');   // 'dark'
persistence.delete('theme');
```

### With scope

```typescript
persistence.write('token', 'abc', 'private');
persistence.read<string>('token', 'private');  // 'abc'
persistence.delete('token', 'private');
```