open-index/open-npm huggingface dataset:
npm package: @omnicajs/symfony-router
Description: [![npm version](https://img.shields.io/npm/v/@omnicajs/symfony-router.svg)](https://www.npmjs.com/package/@omnicajs/symfony-router)
Author: OmnicaJS
Latest version: 1.0.0

# @omnicajs/symfony-router

[![npm version](https://img.shields.io/npm/v/@omnicajs/symfony-router.svg)](https://www.npmjs.com/package/@omnicajs/symfony-router)

JavaScript URL generator for Symfony framework based on FOSJsRoutingBundle sources v3.5.0.

Unfortunately, there is no npm package for original js router, so here we have a copy.

Original repository: https://github.com/FriendsOfSymfony/FOSJsRoutingBundle

## Installation

Using npm:

```bash
npm i --save @omnicajs/symfony-router
```

Using yarn:

```bash
yarn add @omnicajs/symfony-router
```
npm package: @omnicar/sam-format
Description: Library for formatting different kinds of data according to type and locale
Author: Omnicar A/S
Latest version: 1.0.1

# SAM-format
Library for formatting data according to locale and options given.

## Installation (for development)

`yarn` or `npm i` (examples below are using `yarn`)

## Installation on clients

`yarn add omnicar/sam-format#0.0.1`

Where `#0.0.1` indicates the `Github` release tag.

## Usage

First call `initFormats`.

```
const options = {
  countryCode: TIsoCountry,
  currencyCode: TCurrency,
  language: IsoLocale
}

initFormats(options)
```

Example:
`
  initFormats({
    countryCode: 'DK',
    currencyCode: 'DKK',
    language: 'da-DK'
  })
`

## Formatters

There are 4 formatters:

### formatMileage(value, [opts])

`showDecimals` (true | **false**) show decimals in formatted number

`symbolDisplayType` (APPEND | PREPEND | **NONE**) where to put symbol related to number type

### formatCurrency(value, [opts])

`showDecimals` (**true** | false) show decimals in formatted number

`symbolDisplayType` (APPEND | PREPEND | **NONE**) where to put symbol related to number type

### formatNumber(value, [showDecimals])

`showDecimals` (**true** | false) show decimals in formatted number

### formatDate(value, [opts])

`showTime` (true | **false**) append time in formatted date

`rawFormat` (string) pass date format string to format with

_example: `formatDate(new Date(2018-01-23), {rawFormat: 'YYYYMMDD'})` // '20189123'_

## Tests

To run `jest` tests either run:

`yarn test`

or to run tests in watch mode run:

`yarn test-watch`

### Compile application (`tsc`):

`yarn tsc`
npm package: @omnicar/sam-log
Description: Handles logging to console and to stackdriver
Author: Omnicar A/S
Latest version: 1.2.3

# SAM-log

## Usage
The default settings should make sure that no initialisation of the library is needed for Omnicar's applications.
The only **prerequisite** to having the library default to sane environment specific loglevels is having the `NODE_ENV` environment variable available (set to: `production` | `staging` | `development` | `local`)

Another option is to have the `LOG_LEVEL` environment variable available (has to be one of: `error` | `warn` | `info` | `verbose` | `debug` | `silly`) which will set/override the loglevel directly

To use the library, simply import the log function needed. E.g. `logError` and use it like a regular call to `console.error`

It's possible to use an optional prefix for all the logging methods. The available logging methods are:

* `logError(message: string | object, info?: ILogInfo)`
* `logWarn(message: string | object, info?: ILogInfo)`
* `logInfo(message: string | object, info?: ILogInfo)`
* `logVerbose(message: string | object, info?: ILogInfo)`
* `logDebug(message: string | object, info?: ILogInfo)`

## Developing

Pull the project, run `yarn` and you should be good

Before you do a `git push`, please run `yarn tsc-once` to generate the build folder contents

## Testing

There are a bunch of `jest` tests in the `index.test.ts` file. Run `yarn test` to run all tests, `yarn test-watch` to run them in watch-mode, and run `yarn test-debug` to run them in watch mode with `--inspect` enabled (allowing you to step debug)

## Releasing

Releasing a new version is done as a `Github` release.

The `Github` release will automatically trigger a build in `Circle` that publishes the new version to npm 👍
npm package: @omnicar/sam-modal
Description: A Modal component for React
Author: Omnicar A/S
Latest version: 0.0.3

# SamModal

SAM React component for displaying a Modal dialogue.

## Example usage

```
state = {
  isVisible: true
};
hideCb = () => { this.setState({isVisible: false}); }

// render function inside React component
render() {
  const html: string = "<h1>Hello World</h1>"

  return (
    <div>
    {isVisible &&
        <SamModal
          htmlContent={html}
          hideCb={ hideCb }
          widthPct={40}
          heightPct={40} />
    }
    </div>
  );
}
```
npm package: @omnicar/sam-tfetch
Description: A wrapper around fetch that allows type safety in request/response.
Author: Omnicar A/S
Latest version: 0.0.19

# tfetch

Small wrapper around `fetch` making it possible to get `JSON` parsed values returned.
With the typescript definitions, it is also possible to indicate which types are expected on success/error and work directly with those types.

Examples will follow :)
npm package: @omnicar/sam-translate
Description: Handles fetching translations, looking up individual translations, and error reporting of missing translations
Author: Omnicar A/S
Latest version: 1.0.2

# SAM-translate
Client js library for fetching translations in a given format (see `ILocaleTranslation`), translating strings, and reporting issues when found.

## Installation (for development)

`yarn` or `npm i` (examples below are using `yarn`)

## Installation on clients

`yarn add OmniCar/sam-translate#0.0.1`

Where `#0.0.1` indicates the `Github` release tag.

## Usage

First call the `init` function with the parameters that match your environment (dev/staging/prod etc.) or current needs.

These parameters are available:

* `translationFileUrl` - endpoint from where to fetch the translations
* `errorCallback` - function used for reporting errors. Defaults to `window.alert`
* `notify` - whether the library should report errors to an endpoint (see below)
* `notificationEndpoint` - endpoint for `POST`ing errors
* `cache` - whether the library should use cache expiration (see below)
* `cacheExpirationTime` - cache expiration time for local storage
* `useLocalStorage` - whether the library should save translations to `localStorage`
* `locale` - the locale to use. Defaults to the first one from the received translations

## Tests

To run `jest` tests either run:

`yarn test`

or to run tests in watch mode run:

`yarn test-watch`

### Compile application (`tsc`):

`yarn tsc`
npm package: @omnicar/sam-zip-city
Description: A simple tool for looking up city names based on zipcode inputs.
Author: Erik Beuschau, Marko K. Seppänen
Latest version: 1.0.1

# SAM zip-city
This library aims to do city lookups in a fast (client-side), generic way.

The script will dynamically load the appropriate file with zipcodes and city names for a given country.

This allows for smaller bundle size and means that the file(s) are only downloaded when needed.

## How to install
`npm install @omnicar/sam-zip-city` or `yarn add @omnicar/sam-zip-city`

## FAQ ##
Question:
> _But are all the zip code files inside the imported package?_
>
Answer: No, only the file(s) with the postal codes (zip codes) of the requested country are retrieved dynamically at run time.

Question:
> _From where are the file(s) with the postal codes (zip codes) fetched from?_
>
Answer: The postal codes are fetched from admin `dot` omnicar `dot` io `slash` data `slash` zip-codes `slash`

---

## How to use
```
import { getCityFromZip } from '@omnicar/sam-zip-city'

const myFunc = async () => {
  const city = await getCityFromZip({
    zipcode: 2300,
    country: 'DK' 
  })
  console.log(city)
}
```

Or to initialise a country before requesting a city:
```
import { initZipCityCountry } from '@omnicar/sam-zip-city'

const myOtherFunc = async () => {
  await initZipCityCountry({ country: 'DK' })
  console.log('Danish zipcodes and cities should be ready!')
}
```
npm package: @omnichat/middy-lock-redis
Description: Middy Lock Redis Lambda
Author: OmniChat by @fzanfolim
Latest version: 1.0.0

# Middy Lock Redis

Custom middleware created to lock redis on input and unlock on output lambda execution

Note - designed for use in HTTP and SQS functions

![Fluxo](https://raw.githubusercontent.com/OmniChat/middy-lock-redis/main/image/fluxo2.png)

## Install

To install this middleware you can use NPM:

```ssh
$ npm install --save @omnichat/middy-lock-redis
```

## Usage Example

```typescript
import middy from '@middy/core';
import { MiddlewareLock } from '@omnichat/middy-lock-redis';
import { Redis } from 'ioredis';

const redis = new Redis({
    host: 'http://localhost/',
    port: 6379,
});

export const baseHandler = async (event) => {
  return {
    statusCode: 200,
    headers: {},
    body: event.body,
  };
};

exports.handler = middy(baseHandler).use(
  MiddlewareLock('prefix', 'key', client, ttl, options),
);
```

## Information

For use in SQS when configured in lambda, ( event > sqs > batchSize ) it is necessary to add another property which is :

functionResponseTypes: ReportBatchItemFailures

This will make it so that when you lock the record, it returns to the queue only the record that was locked.

Below is an example of SQS lambda function configuration:

```yaml
lambda-function:
  handler: src/function.handler
  events:
    - sqs:
        batchSize: 6
        functionResponseTypes: ReportBatchItemFailures
        arn:
          Fn::GetAtt:
            - Queue
            - Arn
```

## Parameters

- `prefix (required)` - Prefix for mounting the key in the registry lock
- `param (required)` - Name of the parameter that will be retrieved from the request to be used as a registry lock key
- `connection (required)` - Redis client connection that will be used by redlock
- `ttl (optional)` - Lock expiration time, if not informed the default is 7500
- `options (optional)` - Redlock options configuration for more information on the options see the redlock doc [here](https://github.com/mike-marcacci/node-redlock). Default value if not informed is:

```typescript
{
driftFactor: 0.1,
retryCount: 1,
};
```

## Run test

To run the unit tests, run following command

```bash
  npm run test
```

## Libraries

Used:

- [redlock](https://github.com/mike-marcacci/node-redlock)

Dependence:

- [Middy](https://github.com/middyjs/middy)
- [ioredis](https://github.com/luin/ioredis)

Obs: if you have an installation problem of not having the redlock library, you will have to install it in your project

## Credits

Created by [@fzanfolim](https://github.com/fzanfolim) in OmniChat Squad Bot
npm package: @omnicrypt/currency-symbols
Description: A collection of the symbols for many different currencies.
Author: Carter Snook
Latest version: 0.0.4

# @omnicrypt/currency-symbols

A collection of the symbols for many different currencies.

## Usage

### Node

Add the library to your current package:

```sh
npm install @omnicrypt/currency-symbols
```

Import any of your needed members using `require` or regular `import` statements depending on your project configuration:

```js
// CommonJS
const { Currency } = require("@omnicrypt/currency-symbols");

// ESM
import { Currency } from "@omnicrypt/currency-symbols";
```

## API

### `Currency`

A list of both world currencies and cryptocurrencies. The properties of the object are the currency alias and the value is the currency's symbol.

#### Example

```js
const btc = Currency.Bitcoin; // "BTC"
```

### `WorldCurrency`

// TODO

### `CryptoCurrency`

// TODO

### `createCustomCurrency`

// TODO

## License

[MIT](./LICENSE)
npm package: @omnid/pre
Description: A proxy re-encryption implementation using the secp256k1 curve.
Author: Anudit Nagar
Latest version: 0.4.0

# @omnid/pre ![npm/v](https://img.shields.io/npm/v/@omnid/pre)

![npm/types](https://img.shields.io/npm/types/@omnid/pre)
![nodeVersion](https://img.shields.io/node/v/@omnid/pre)
![bundlephobia/dependency-count](https://img.shields.io/librariesio/release/npm/@omnid/pre)
![bundlephobia/minzip](https://img.shields.io/bundlephobia/minzip/@omnid/pre)
![bundlephobia/min/](https://img.shields.io/bundlephobia/min/@omnid/pre)

A proxy re-encryption implementation using the secp256k1 curve

Check out the [Changelog](CHANGELOG.md)

## Installation

```bash
yarn add @omnid/pre
npm i --save @omnid/pre
pnpm i --save @omnid/pre
```

Inspired from [recrypt-js](https://github.com/yjjnls/recrypt-js)