open-index/open-npm huggingface dataset:
npm package: @ost-ins/srapp-lib
Description: Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.
Author: Davor Gajic
Latest version: 0.0.7

# srapp-lib

This repo contains the UI library for all SR application.
Its published [here](https://www.npmjs.com/package/@ost-ins/srapp-lib).

To publish a new version:
```bash
npm login --scope=ost-ins
npm publish --access=public
```

## Commands

TSDX scaffolds your new library inside `/src`, and also sets up a [Parcel-based](https://parceljs.org) playground for it inside `/example`.

The recommended workflow is to run TSDX in one terminal:

```bash
npm start # or yarn start
```

This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.

Then run Storybook:

### Storybook

Run inside another terminal:

```bash
yarn storybook
```

This loads the stories from `./stories`.

> NOTE: Stories should reference the components as if using the library, similar to the example playground. This means importing from the root project directory. This has been aliased in the tsconfig and the storybook webpack config as a helper.
npm package: @ostabo/flag-icons
Description: > A curated collection of all country flags in SVG — plus the CSS for easier integration. See the [demo](https://flagicons.lipis.dev).
Author: Panayiotis Lipiridis
Latest version: 8.0.0

# flag-icons

> A curated collection of all country flags in SVG — plus the CSS for easier integration. See the [demo](https://flagicons.lipis.dev).

## Install

You can either [download](https://github.com/lipis/flag-icons/archive/main.zip) the whole project as is or install it via npm or Yarn:

```bash
npm install flag-icons
# or
yarn add flag-icons
```

## Usage

First, you need to import css:

```js
import "/node_modules/flag-icons/css/flag-icons.min.css";
```

or use CDN:

```html
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/gh/lipis/flag-icons@7.0.0/css/flag-icons.min.css"
/>
```

For using the flags inline with text add the classes `.fi` and `.fi-xx` (where `xx` is the [ISO 3166-1-alpha-2 code](https://www.iso.org/obp/ui/#search/code/) of a country) to an empty `<span>`. If you want to have a squared version flag then add the class `fis` as well. Example:

```html
<span class="fi fi-gr"></span> <span class="fi fi-gr fis"></span>
```

You could also apply this to any element, but in that case you'll have to use the `fib` instead of `fi` and you're set. This will add the correct background with the following CSS properties:

```css
background-size: contain;
background-position: 50%;
background-repeat: no-repeat;
```

Which means that the flag is just going to appear in the middle of an element, so you will have to set manually the correct size of 4 by 3 ratio or if it's squared add also the `flag-icon-squared` class.

## Development

Run the `yarn` to install the dependencies after cloning the project and you'll be able to:

To build `*.scss` files

```bash
$ yarn build
```

To serve it on `localhost:8000`

```bash
$ yarn start
```

To have only specific countries in the css file, remove the ones that you don't need from the [`_flag-icons-list.scss`](sass/_flag-icons-list.scss) file and build it again.

## Credits

- This project wouldn't exist without the awesome and now deleted collection of SVG flags by [koppi](https://github.com/koppi).
- Thank you [Andrejs Abrickis](https://twitter.com/andrejsabrickis) for providing the `flag-icons` name on [npm](https://www.npmjs.com/package/flag-icons).
npm package: @ostai/cacheman-redis
Description: Redis standalone caching library for Node.JS and also cache engine for Cacheman
Author: Jonathan Brumley
Latest version: 2.0.2

[![Build Status](https://travis-ci.org/kaelzhang/cacheman-redis.svg?branch=master)](https://travis-ci.org/kaelzhang/cacheman-redis)

<!-- [![Coverage](https://codecov.io/gh/BiJie/binance-scripts/branch/master/graph/badge.svg)](https://codecov.io/gh/BiJie/binance-scripts) -->

# @ostai/cacheman-redis

Redis standalone caching library for Node.JS and also cache engine for [cacheman](https://github.com/cayasso/cacheman).

This fork removes peer dependencies `redis` and only supports to create a `CachemanRedis` with a redis client

## Install

``` bash
$ npm i @ostai/cacheman-redis
```

## Usage

```js
const CachemanRedis = require('@ostai/cacheman-redis')
const Redis = require('ioredis')
const cache = new CachemanRedis(new Redis())

// set the value
cache.set('key', {foo: 'bar'}, err => {
  if (err) {
    throw err
  }

  console.log('succeeded')
})

// But for most cases,
// CachemanRedis is used as an engine of Cacheman
const Cacheman = require('cacheman')
const man = new Cacheman('prefix', {
  engine: cache
})

const value = await man.get('key')
```

## API

### CachemanRedis(client, options?)

- **client** `RedisClient` redis `client` instance
- **options** `?Object`
  - **prefix** `?string=''` key prefix

Create a `CachemanRedis` instance.

```js
const Redis = require('ioredis')
const cache = new CachemanRedis(new Redis())
```

### cache.set(key, value, ttl?, callback?)

Stores or updates a value.

```javascript
cache.set('foo', { a: 'bar' }, function (err, value) {
  if (err) throw err
  console.log(value) //-> {a:'bar'}
})
```

Or add a TTL(Time To Live) in seconds like this:

```javascript
// key will expire in 60 seconds
cache.set('foo', {a: 'bar'}, 60, (err, value) => {
  if (err) throw err
  console.log(value) //-> {a:'bar'}
})
```

### cache.get(key, callback?)

Retrieves a value for a given key, if there is no value for the given key a null value will be returned.

```js
cache.get(key, (err, value) => {
  if (err) throw err
  console.log(value)
})
```

### cache.del(key, callback?)

Deletes a key out of the cache.

```javascript
cache.del('foo', err => {
  if (err) throw err
  // foo was deleted
})
```

### cache.clear(callback?)

Clear the cache entirely, throwing away all values.

```javascript
cache.clear(err => {
  if (err) throw err
  // cache is now clear
})
```

## Run tests

``` bash
$ make test
```

## License

[MIT](LICENSE)
npm package: @ostai/env
Description: manage and get process.env
Author: kaelzhang
Latest version: 1.1.2

[![build][bb]][bl]
[![Coverage](https://codecov.io/gh/kaelzhang/ostai-env/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/ostai-env)

[bb]: https://github.com/kaelzhang/ostai-env/actions/workflows/nodejs.yml/badge.svg
[bl]: https://github.com/kaelzhang/ostai-env/actions/workflows/nodejs.yml

<!-- optional appveyor tst
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/ostai-env?branch=master&svg=true)](https://ci.appveyor.com/project/kaelzhang/ostai-env)
-->
<!-- optional npm version
[![NPM version](https://badge.fury.io/js/ostai-env.svg)](http://badge.fury.io/js/ostai-env)
-->
<!-- optional npm downloads
[![npm module downloads per month](http://img.shields.io/npm/dm/ostai-env.svg)](https://www.npmjs.org/package/ostai-env)
-->
<!-- optional dependency status
[![Dependency Status](https://david-dm.org/kaelzhang/ostai-env.svg)](https://david-dm.org/kaelzhang/ostai-env)
-->

# ostai-env

Manage and get `process.env`

## Install

```sh
$ npm i @ostai/env
```

## Usage

```ts
type Converter = (
  value: any,
  // The key of the env variable
  key: string,
  // If the env key does not exist, then `is_default` is true
  is_default: boolean
) => any

env(key: string, converter?: Converter | Array<Converter> | null, defaults?: any): any
```

- **key** `string` environment key
- **converter?** `Converter | Array<Converter> | null` the method to convert env value
- **defaults?** `any` the default value if environment key is not found

```js
const port = env('SERVER_PORT', env.integer, 80)
```

### Converter functions

- `env.boolean` which treats `'true'` / `'1'` / `Y` / etc as `true`
- `env.integer` converts the given value to an integer.
- `env.required` if the env variable is not found, an `RangeError` will throw

## License

MIT
npm package: @ostai/eslint-config
Description: Custom eslint configuration of ostai
Author: kaelzhang
Latest version: 4.0.0

[![Build Status](https://travis-ci.org/kaelzhang/eslint-config-ostai.svg?branch=master)](https://travis-ci.org/kaelzhang/eslint-config-ostai)
[![Coverage](https://codecov.io/gh/kaelzhang/eslint-config-ostai/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/eslint-config-ostai)
<!-- optional appveyor tst
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/eslint-config-ostai?branch=master&svg=true)](https://ci.appveyor.com/project/kaelzhang/eslint-config-ostai)
-->
<!-- optional npm version
[![NPM version](https://badge.fury.io/js/eslint-config-ostai.svg)](http://badge.fury.io/js/eslint-config-ostai)
-->
<!-- optional npm downloads
[![npm module downloads per month](http://img.shields.io/npm/dm/eslint-config-ostai.svg)](https://www.npmjs.org/package/eslint-config-ostai)
-->
<!-- optional dependency status
[![Dependency Status](https://david-dm.org/kaelzhang/eslint-config-ostai.svg)](https://david-dm.org/kaelzhang/eslint-config-ostai)
-->

# eslint-config-ostai

Custom eslint config

## Install

```sh
$ npm i -D @ostai/eslint-config
```

## Usage

.eslintrc.js

```js
module.exports = {
  extends: require.resolve('@ostai/eslint-config')
}
```

## License

MIT
npm package: @ostai/koa-response
Description: Response middleware for koa that will handle response body and errors
Author: kaelzhang
Latest version: 1.0.1

[![Build Status](https://travis-ci.org/kaelzhang/ostai-koa-response.svg?branch=master)](https://travis-ci.org/kaelzhang/ostai-koa-response)
[![Coverage](https://codecov.io/gh/kaelzhang/ostai-koa-response/branch/master/graph/badge.svg)](https://codecov.io/gh/kaelzhang/ostai-koa-response)
<!-- optional appveyor tst
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/github/kaelzhang/ostai-koa-response?branch=master&svg=true)](https://ci.appveyor.com/project/kaelzhang/ostai-koa-response)
-->
<!-- optional npm version
[![NPM version](https://badge.fury.io/js/@ostai/koa-response.svg)](http://badge.fury.io/js/@ostai/koa-response)
-->
<!-- optional npm downloads
[![npm module downloads per month](http://img.shields.io/npm/dm/@ostai/koa-response.svg)](https://www.npmjs.org/package/@ostai/koa-response)
-->
<!-- optional dependency status
[![Dependency Status](https://david-dm.org/kaelzhang/ostai-koa-response.svg)](https://david-dm.org/kaelzhang/ostai-koa-response)
-->

# @ostai/koa-response

Response middleware for koa that will handle response body and errors.

This module is designed to standardize server response structure.

## Install

```sh
$ npm i @ostai/koa-response
```

## Usage

```js
const Koa = require('koa')
const Router = require('@koa/router')

const response = require('@ostai/koa-response')

const app = new Koa()
const router = new Router()

router.get('/foo', () => 'ok')

router.get('/bar', () => {
  const error = new Error('bar')
  error.status = 401
  throw error
})


app
.use(
  response({
    debug: true
  })
)
.use(router.routes())
.use(router.allowedMethods())


app.listen(8888)
```

```sh
> curl http://localhost:8888/foo

# http 200
# ok
```

```sh
> curl http://localhost:8888/bar

# http 401
# {"message":"bar"}
```

## response(options?): Function

- **options?** `Object`
  - **error?** `Function(ctx, error, rest): void` the method to handle error
  - **success?** `Function(ctx, body, rest): void` the method to handle success
  - **...rest?** `Object`
    - **debug** `boolean=false` Which is used by the default value of `options.error`. By default, if `debug` is `false`, error response will not contain `message`.

Returns `Function` the middleware function.

## License

[MIT](LICENSE)
npm package: @ostai/minimist
Description: parse argument options
Author: James Halliday
Latest version: 1.2.2

[![Build Status](https://travis-ci.org/kaelzhang/minimist.svg?branch=master)](https://travis-ci.org/kaelzhang/minimist)

# @ostai/minimist

The fork of [substack/minimist](https://github.com/substack/minimist).

The difference is that

```js
const argv = require('@ostai/minimist')(['node', 'foo.js', '-x'], {
  boolean: ['x'],
  default: {
    x: undefined
  }
})

console.log(argv.x)
// undefined

// while if you are using `minimist`, `argv.x` will be `false`
```

****

parse argument options

This module is the guts of optimist's argument parser without all the
fanciful decoration.

[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)

# example

``` js
var argv = require('@ostai/minimist')(process.argv.slice(2));
console.dir(argv);
```

```
$ node example/parse.js -a beep -b boop
{ _: [], a: 'beep', b: 'boop' }
```

```
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
{ _: [ 'foo', 'bar', 'baz' ],
  x: 3,
  y: 4,
  n: 5,
  a: true,
  b: true,
  c: true,
  beep: 'boop' }
```

# methods

``` js
var parseArgs = require('@ostai/minimist')
```

## var argv = parseArgs(args, opts={})

Return an argument object `argv` populated with the array arguments from `args`.

`argv._` contains all the arguments that didn't have an option associated with
them.

Numeric-looking arguments will be returned as numbers unless `opts.string` or
`opts.boolean` is set for that argument name.

Any arguments after `'--'` will not be parsed and will end up in `argv._`.

options can be:

* `opts.string` - a string or array of strings argument names to always treat as
strings
* `opts.boolean` - a boolean, string or array of strings to always treat as
booleans. if `true` will treat all double hyphenated arguments without equal signs
as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
* `opts.alias` - an object mapping string names to strings or arrays of string
argument names to use as aliases
* `opts.default` - an object mapping string argument names to default values
* `opts.stopEarly` - when true, populate `argv._` with everything after the
first non-option
* `opts['--']` - when true, populate `argv._` with everything before the `--`
and `argv['--']` with everything after the `--`. Here's an example:

  ```
  > require('./')('one two three -- four five --six'.split(' '), { '--': true })
  { _: [ 'one', 'two', 'three' ],
    '--': [ 'four', 'five', '--six' ] }
  ```

  Note that with `opts['--']` set, parsing for arguments still stops after the
  `--`.

* `opts.unknown` - a function which is invoked with a command line parameter not
defined in the `opts` configuration object. If the function returns `false`, the
unknown option is not added to `argv`.

# install

With [npm](https://npmjs.org) do:

```
npm install minimist
```

# license

MIT