open-index/open-npm huggingface dataset:
npm package: @micro-fleet/id-generator
Description: Provides methods to generate database primary key ID.
Author: gennovative
Latest version: 2.4.0-rc1

# Micro Fleet - Backend ID Generator library

Belongs to Micro Fleet framework, provides methods to generate database primary key ID.

See more examples and usage guide in unit test.

## INSTALLATION

- Stable version: `npm i @micro-fleet/id-generator`
- Edge (development) version: `npm i git://github.com/gennovative/micro-fleet-id-generator.git`

## DEVELOPMENT

- Install packages in `peerDependencies` section with command `npm i --no-save {package name}@{version}`. Or if you want to use directly neighbor packages, excute `npm run linkPackages`.
- `npm run build` to transpile TypeScript then run unit tests (if any) (equiv. `npm run compile` + `npm run test` (if any)).
- `npm run compile`: To transpile TypeScript into JavaScript.
- `npm run watch`: To transpile without running unit tests, then watch for changes in *.ts files and re-transpile on save.
- `npm run test`: To run unit tests.
  * After tests finish, open file `/coverage/index.html` with a web browser to see the code coverage report which is mapped to TypeScript code.


## RELEASE

- `npm run release`: To transpile and create `app.d.ts` definition file.
- **Note:** Please commit transpiled code in folder `dist` and definition file `app.d.ts` relevant to the TypeScript version.
npm package: @micro-fleet/microservice
Description: Provides backbone and manage lifecycle for microservice.
Author: gennovative
Latest version: 2.4.0-rc1

# Micro Fleet - Microservice

Belongs to Micro Fleet framework. Provides a base class that manages the lifecycle of a (micro)service.

## INSTALLATION

- Stable version: `npm i @micro-fleet/microservice`
- Edge (development) version: `npm i git@github.com:gennovative/micro-fleet-microservice.git`

## DEVELOPMENT

- Install packages in `peerDependencies` section with command `npm i --no-save {package name}@{version}`.

  Otherwise, you directly use neighbor packages by excuting `npm run linkPackages`. It creates symlinks to all directories in `packages/libs`. The symlinks stay in the `{monorepo root}/node_modules/@micro-fleet`.

- `npm run build` to transpile TypeScript then run unit tests (if any) (equiv. `npm run compile` + `npm run test` (if any)).
- `npm run compile`: To transpile TypeScript into JavaScript.
- `npm run watch`: To transpile without running unit tests, then watch for changes in *.ts files and re-transpile on save.
- `npm run test`: To run unit tests.

## RELEASE

- `npm run release`: To transpile and create `app.d.ts` definition file.
- **Note:** Please commit transpiled code in folder `dist` and definition file `app.d.ts` relevant to the TypeScript source code. So that other people can `npm install {git URL}` and use the package without the burden of devDependencies and transpilation.
npm package: @micro-fleet/oauth
Description: Provides helpers for authentication and authorization.
Author: gennovative
Latest version: 1.0.1

## Micro Fleet - OAuth library

Belongs to Micro Fleet framework, provides helpers for authentication and authorization.

See more examples and usage guide in unit test.

## INSTALLATION

- Stable version: `npm i @micro-fleet/oauth`
- Edge (development) version: `npm i git@github.com:gennovative/micro-fleet-oauth.git`

## DEVELOPMENT

- Install packages in `peerDependencies` section with command `npm i --no-save {package name}@{version}`. Or if you want to use directly neighbor packages, excute `npm run linkPackages`.
- `npm run build` to transpile TypeScript then run unit tests (if any) (equiv. `npm run compile` + `npm run test` (if any)).
- `npm run compile`: To transpile TypeScript into JavaScript.
- `npm run watch`: To transpile without running unit tests, then watch for changes in *.ts files and re-transpile on save.
- `npm run test`: To run unit tests.

## RELEASE

- `npm run release`: To transpile and create `app.d.ts` definition file.
- **Note:** Please commit transpiled code in folder `dist` and definition file `app.d.ts` relevant to the TypeScript version.
npm package: @micro-fleet/persistence
Description: Provides base repository class and database connector that helps connect to database and map db tables to JS objects (ORM).
Author: gennovative
Latest version: 2.4.0-rc1

# Micro Fleet - Backend Persistence library

Belongs to Micro Fleet framework, provides base repository class with pre-implemented CRUD operations.

## INSTALLATION

- Stable version: `npm i @micro-fleet/persistence`
- Edge (development) version: `npm i git://github.com/gennovative/micro-fleet-persistence.git`

## DEVELOPMENT

  ### TRANSPILE CODE
  - Install packages in `peerDependencies` section with command `npm i --no-save {package name}@{version}`. Or if you want to use directly neighbor packages, excute `npm run linkPackages`.
  - `npm run build` to transpile TypeScript then run unit tests (if any) (equiv. `npm run compile` + `npm run test` (if any)).
  - `npm run compile`: To transpile TypeScript into JavaScript.
  - `npm run watch`: To transpile without running unit tests, then watch for changes in *.ts files and re-transpile on save.
  - `npm run test`: To run unit tests.
    * After tests finish, open file `/coverage/index.html` with a web browser to see the code coverage report which is mapped to TypeScript code.

  ### CREATE UNIT TEST DATABASE
  - One of the quickest ways to set up the test environment is to use Docker:

    `docker run -d --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres:9.6-alpine`

  - Create a database name `unittest-persistence`. If you want to change the name as well as database credentials, edit file `/src/test/database-details.ts` then execute `npm run compile`.
  - Install knex globally: `npm i -g knex`
  - Jump to database migration folder: `cd database`
  - Execute: `knex migrate:latest`
  - Note:
    * Existing tables are dropped.
    * If you want to re-run migration script, truncate all rows in `knex_migrations` table in database.

## RELEASE

- `npm run release`: To transpile and create `app.d.ts` definition file.
- **Note:** Please commit transpiled code in folder `dist` and definition file `app.d.ts` relevant to the TypeScript version.
npm package: @micro-fleet/service-communication
Description: Provides methods for microservices to communicate with each other.
Author: gennovative
Latest version: 2.4.0-rc2

# Micro Fleet - Backend Service Communication library

Belongs to Micro Fleet framework, provides methods for microservices to communicate with each other.

See more examples and usage guide in unit tests.

## INSTALLATION

- Stable version: `npm i @micro-fleet/service-communication`
- Edge (development) version: `npm i git://github.com/gennovative/micro-fleet-service-communication.git`

## DEVELOPMENT

- Install packages in `peerDependencies` section with command `npm i --no-save {package name}@{version}`. Or if you want to use directly neighbor packages, excute `npm run linkPackages`.
- `npm run build` to transpile TypeScript then run unit tests (if any) (equiv. `npm run compile` + `npm run test` (if any)).
- `npm run compile`: To transpile TypeScript into JavaScript.
- `npm run watch`: To transpile without running unit tests, then watch for changes in *.ts files and re-transpile on save.
- `npm run test`: To run unit tests.
  * One of the quickest way to set up the test environment is to use Docker:

    `docker run -d --name rabbitmq -p 15672:15672 -p 5672:5672 rabbitmq:3.6-management-alpine`

  * After tests finish, open file `/coverage/index.html` with a web browser to see the code coverage report which is mapped to TypeScript code.

## RELEASE

- `npm run release`: To transpile and create `app.d.ts` definition file.
- **Note:** Please commit transpiled code in folder `dist` and definition file `app.d.ts` relevant to the TypeScript version.
npm package: @micro-fleet/web
Description: Contains classes used by web and rest services.
Author: gennovative
Latest version: 2.4.0-rc1

## Micro Fleet - Web library

Belongs to Micro Fleet framework, contains classes used by web and rest services. 

See more examples and usage guide in unit test.

## INSTALLATION

- Stable version: `npm i @micro-fleet/web`
- Edge (development) version: `npm i git@github.com:gennovative/micro-fleet-web.git`

## DEVELOPMENT

- Install packages in `peerDependencies` section with command `npm i --no-save {package name}@{version}`. Or if you want to use directly neighbor packages, excute `npm run linkPackages`.
- `npm run build` to transpile TypeScript then run unit tests (if any) (equiv. `npm run compile` + `npm run test` (if any)).
- `npm run compile`: To transpile TypeScript into JavaScript.
- `npm run watch`: To transpile without running unit tests, then watch for changes in *.ts files and re-transpile on save.
- `npm run test`: To run unit tests.

## RELEASE

- `npm run release`: To transpile and create `app.d.ts` definition file.
- **Note:** Please commit transpiled code in folder `dist` and definition file `app.d.ts` relevant to the TypeScript version.
npm package: @micro-graphql/core
Description: See [https://github.com/jacob-ebey/micro-graphql-monorepo/](https://github.com/jacob-ebey/micro-graphql-monorepo/) for more information.
Latest version: 1.1.1

# @micro-graphql/core

See [https://github.com/jacob-ebey/micro-graphql-monorepo/](https://github.com/jacob-ebey/micro-graphql-monorepo/) for more information.
npm package: @micro-graphql/hooks
Description: See [https://github.com/jacob-ebey/micro-graphql-monorepo/](https://github.com/jacob-ebey/micro-graphql-monorepo/) for more information.
Latest version: 1.1.2

# @micro-graphql/hooks

See [https://github.com/jacob-ebey/micro-graphql-monorepo/](https://github.com/jacob-ebey/micro-graphql-monorepo/) for more information.
npm package: @micro-image/image
Description: This is an image component for React meant to consume an image proxy, currently supporting two: our own, [@micro-image/proxy-image](https://github.com/veksen/micro-image), and [ipx](https://github.com/unjs/ipx), for the time being. Use a single, high-qual
Latest version: 0.0.3

# @micro-image/image

This is an image component for React meant to consume an image proxy, currently supporting two: our own, [@micro-image/proxy-image](https://github.com/veksen/micro-image), and [ipx](https://github.com/unjs/ipx), for the time being. Use a single, high-quality image, this component will only load the appropriate size.

## Install

```bash
npm install @micro-image/image
```

## Usage

```js
import Image from "@micro-image/react"

function YourComponent() {
  return (
    <div>
      <MicroImage
        src="https://picsum.photos/800/500"
        width={800}
        height={500}
        objectFit="cover"
      />
    </div>
  )
}
```

Note: The image will always take 100% of the width of the parent, that's intended. If you wish to change that, wrap it in an element with limited width, for example, `<div style={{ width: "400px }}>`.

### Props

`src`: For @micro-image/proxy-image, that's the full URL of the image. For ipx, that's the stored path to your image, within ipx.

`width` and `height`: Used for aspect ratio, must be provided.

`objectFit`: "cover" | "contain" | "none", optional, defaults to "none".

`alt`: optional, defaults to empty string if not provided.

## Provider

A provider component is available. Must be used to set your provider (micro-image or ipx), and the URL to your image proxy.

```js
import Image from "@micro-image/react"

function YourComponent() {
  return (
    <div>
      <MicroImage
        src="https://picsum.photos/800/500"
        width={800}
        height={500}
        objectFit="cover"
      />
    </div>
  )
}

function App() {
  return (
    <ImageCacheProvider
      provider="micro-image"
      cacheProxyUrl="http://localhost:4000/cache"
    >
      <YourComponent />
    </ImageCacheProvider>
  )
}
```

## Limitations

You must know the image width, or at least the aspect ratio you're trying to use. This is intended to avoid [CLS](https://web.dev/cls/), by avoiding the page from jumping when the image loads.

Also, as referenced previously, this component cannot be used without an image proxy, and currently only 2 are supported.
npm package: @micro-js/array-equal
Description: Check if two arrays have shallow equality
Latest version: 1.0.0


# array-equal

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

Check if two arrays have shallow equality

## Installation

    $ npm install @micro-js/array-equal

## Usage

`arrayEqual([1, 2], [1, 2]) === true`

`arrayEqual([1, 2], [1, 2, 3]) === false`


## License

The MIT License

Copyright &copy; 2015, Weo.io &lt;info@weo.io&gt;

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @micro-js/array-to-promise
Description: Convert array to a promise.
Latest version: 1.0.0


# array-to-promise

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Convert array to a promise.

## Installation

    $ npm install @micro-js/array-to-promise

## Usage

```js
var arrayToPromise = require('@micro-js/array-to-promise')

arrayToPromise([1, Promise.resolve(2)]).then(function (res) {
  res // => [1, 2]
})

```

## API

### arrayToPromise(array)

- `array` - array of promises and non-promises

**Returns:** array with all promises resolved

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/array-to-promise.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/array-to-promise
[git-image]: https://img.shields.io/github/tag/micro-js/array-to-promise.svg
[git-url]: https://github.com/micro-js/array-to-promise
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/array-to-promise.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/array-to-promise
npm package: @micro-js/as-array
Description: Ensure a value is an array.  If it&#x27;s a scalar, return ne.
Latest version: 1.0.0


# as-array

Ensure a value is an array.  If it&#x27;s a scalar, return ne.

## Installation

    $ npm install as-array

## Usage

Takes in an arbitrary value.  If that value is an array, it returns the value untouched.  If it is not an array, it returns `[value]`.

## License

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @micro-js/assign
Description: Assign properties from source to target.
Latest version: 1.0.0


# assign

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Assign properties from source to target.

## Installation

    $ npm install @micro-js/assign

## Usage

```js
var assign = require('@micro-js/assign')

var target = {a: 1}
var source1 = {b: 2}
var source2 = {c: 3}
assign(target, source1, source2) // => {a: 1, b: 2, c: 3}
```

## API

### assign(target, source)

- `target` - target to copy properties to
- `source` - source of properties

**Returns:** `target`

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/assign.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/assign
[git-image]: https://img.shields.io/github/tag/micro-js/assign.svg
[git-url]: https://github.com/micro-js/assign
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/assign.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/assign
npm package: @micro-js/clone-date
Description: Clone a date object
Latest version: 1.0.0


# clone-date

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Clone a date object

## Installation

    $ npm install @micro-js/clone-date

## Usage

```js
var cloneDate = require('@micro-js/clone-date')
var date = new Date()
var newDate = cloneDate(date)

date.getTime() === newDate.getTime()
date !== newDate
```

## API

### cloneDate(date)

- `date` - The date object to be cloned

**Returns:** A new date object with the same timestamp as `date`

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/clone-date.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/clone-date
[git-image]: https://img.shields.io/github/tag/micro-js/clone-date.svg
[git-url]: https://github.com/micro-js/clone-date
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/clone-date.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/clone-date
npm package: @micro-js/clone-obj
Description: Shallow clone an object
Latest version: 1.0.0


# clone-obj

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Create a shallow copy of an object.

## Installation

    $ npm install @micro-js/clone-obj

## Usage

```js
var cloneObj = require('@micro-js/clone-obj')

cloneObj({a: 1, b: 'test'})
```

## API

### cloneObj(obj)

- `obj` - The object to be cloned

**Returns:** A new object, containing identical keys and values.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/clone-obj.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/clone-obj
[git-image]: https://img.shields.io/github/tag/micro-js/clone-obj.svg
[git-url]: https://github.com/micro-js/clone-obj
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/clone-obj.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/clone-obj
npm package: @micro-js/clone-shallow
Description: Create a shallow clone of an object or array
Latest version: 1.0.0


# clone-shallow

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Create a shallow clone of an object or array

## Installation

    $ npm install @micro-js/clone-shallow

## Usage

```js
var clone = require('@micro-js/clone-shallow')

var arr = [1, 2, 3, 4]
var newArr = clone(arr)

deepEqual(arr, newArr)
arr !== newArr

var obj = {a: 1, b: 2, c: 3}
var newObj = clone(obj)

deepEqual(obj, newObj)
obj !== newObj
```

## API

### cloneShallow(a)

- `a` - The object or array to be cloned

**Returns:** A new object or array with identical contents to `a`.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/clone-shallow.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/clone-shallow
[git-image]: https://img.shields.io/github/tag/micro-js/clone-shallow.svg
[git-url]: https://github.com/micro-js/clone-shallow
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/clone-shallow.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/clone-shallow
npm package: @micro-js/combine-reducers
Description: Combines an object of reducers
Latest version: 1.0.3


# combine-reducers

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Combines an object of reducers together to form a single, composite reducer. This function is identical to the one provided by [https://github.com/rackt/redux](redux) but it doesn't do the sanity checks that redux does, which allows you to do a few things like having multiple root reducers combined into one that you can't do with redux's assertions.

## Installation

    $ npm install @micro-js/combine-reducers

## Usage

```js
var combineReducers = require('@micro-js/combine-reducers')

combineReducers({
  counter1: counterReducer,
  counter2: counterReducer
})

function counterReducer (state, action) {
  if (action.type === INCREMENT) {
    return ++state
  }

  return state
}
```

## API

### combineReducers(reducers)

- `reducers` - An object containing a map of reducers to property names

**Returns:** The combined reducer map as a single reducing function.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/combine-reducers.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/combine-reducers
[git-image]: https://img.shields.io/github/tag/micro-js/combine-reducers.svg
[git-url]: https://github.com/micro-js/combine-reducers
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/combine-reducers.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/combine-reducers
npm package: @micro-js/compose-reducers
Description: Compose two or more reducers
Latest version: 1.0.0


# compose-reducers

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Compose two or more reducers

## Installation

    $ npm install @micro-js/compose-reducers

## Usage

```js
var composeReducers = require('@micro-js/compose-reducers')

composeReducers(reducer1, reducer2)

```

## API

### composeReducers(...reducers)

- `...reducers` - List of reducers to compose together

**Returns:** The composed reducer

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/compose-reducers.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/compose-reducers
[git-image]: https://img.shields.io/github/tag/micro-js/compose-reducers.svg
[git-url]: https://github.com/micro-js/compose-reducers
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/compose-reducers.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/compose-reducers
npm package: @micro-js/concat
Description: Functional version of Array.prototype.concat
Latest version: 1.0.0


# concat

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Functional version of Array.prototype.concat

## Installation

    $ npm install @micro-js/concat

## Usage

```js
var concat = require('@micro-js/concat')

concat([1], [2] // -> [1, 2]
concat([1], 2)  // -> [1, 2]
```

## API

### concat(a, b)

- `a` - Array
- `b` - Array or scalar value to concat onto `a`

**Returns:** A new array with `b`tacked onto the end of `a`.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/concat.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/concat
[git-image]: https://img.shields.io/github/tag/micro-js/concat.svg
[git-url]: https://github.com/micro-js/concat
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/concat.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/concat
npm package: @micro-js/cookies-enabled
Description: Check whether or not cookies are enabled
Latest version: 1.0.0


# cookies-enabled

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Check whether or not cookies are enabled

## Installation

    $ npm install @micro-js/cookies-enabled

## Usage

```js
var cookiesEnabled = require('@micro-js/cookies-enabled')

if (!cookiesEnabled()) {
  alert('Please enable cookies before using this website!')
}

```

## API

### cookiesEnabled()

**Returns:** Boolean indicating whether or not cookies are currently enabled in the user's browser.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/cookies-enabled.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/cookies-enabled
[git-image]: https://img.shields.io/github/tag/micro-js/cookies-enabled.svg
[git-url]: https://github.com/micro-js/cookies-enabled
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/cookies-enabled.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/cookies-enabled
npm package: @micro-js/create-action
Description: Action creator creator for flux standard actions
Latest version: 1.0.3


# create-action

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Action creator creator for flux standard actions.  Very similar to the function of the same name found in [redux-actions](https://github.com/acdlite/redux-actions), but implemented as a micro-module and without the special error handling stuff.

## Installation

    $ npm install @micro-js/create-action

## Usage

```js
var createAction = require('@micro-js/create-action')
var incrementBy = createAction(INCREMENT_BY)

// ...

dispatch(incrementBy(2))
```

## API

### createAction(type, payloadCreator, metaCreator)

- `type` - String or other identifier that represents the type of the action to create
- `payloadCreator` - Function that produces `payload` from the arguments to the action creator (optional - defaults to [https://github.com/micro-js/identity](identity))
- `metaCreator` - Function that produces `meta` from the arguments to the action creator (optional)

**Returns:** An action creator that creates an action according to the arguments specified.

## toString sugar

Action creators returned by `createAction` override `Function.prototype.toString`, and instead return the type string. This allows the function to double as the action type, for useThis means that instead of writing this:

```javascript
const SET_TEXT = 'SET_TEXT'
const setText = createAction('SET_TEXT')

export {
  setText,
  SET_TEXT
}
```

You can just write this:

```javascript
export default createAction('SET_TEXT')
```

And then use it in a [reducer map](http://github.com/micro-js/handle-actions), like this:

```javascript
combineReducers({
  text: handleActions({
    [setText]: (state, text) => text
  })
})
```

## type property

If abusing `toString` as above makes you squeamish, then the type is also set on the `type` property of the action creator, so that you can access it that way as well, if you prefer.




## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/create-action.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/create-action
[git-image]: https://img.shields.io/github/tag/micro-js/create-action.svg
[git-url]: https://github.com/micro-js/create-action
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/create-action.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/create-action
npm package: @micro-js/curry
Description: Simple curry function.
Latest version: 1.0.0


# curry

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Simple curry function.

## Installation

    $ npm install @micro-js/curry

## Usage

```js
var curry = require('@micro-js/curry')

var add = curry(function (a, b) {
  return a + b
})

var addOne = add(1)
addOne(1) // => 1

```

## API

### curry(fn)

- `fn` - function to curry

**Returns:** curried partial of `fn`

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/curry.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/curry
[git-image]: https://img.shields.io/github/tag/micro-js/curry.svg
[git-url]: https://github.com/micro-js/curry
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/curry.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/curry
npm package: @micro-js/curry-all
Description: Curry all of the functions in an object
Latest version: 1.0.1


# curry-all

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Curry all of the functions in an object

## Installation

    $ npm install @micro-js/curry-all

## Usage

```js
var curryAll = require('@micro-js/curry-all')

var a = {test: add}
var b = curryAll(a)

b.test(1)(2) === 3

function add (a, b) {
  return a + b
}

```

## API

### curryAll(obj)

- `obj` - An object containing functions (other values will be skipped) that will be curried by [curry-once](https://github.com/micro-js/curry-once).

**Returns:** A new object with all of its functions curried by [curry-once](https://github.com/micro-js/curry-once)

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/curry-all.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/curry-all
[git-image]: https://img.shields.io/github/tag/micro-js/curry-all.svg
[git-url]: https://github.com/micro-js/curry-all
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/curry-all.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/curry-all
npm package: @micro-js/curry-once
Description: Simple curry function. Just curries once.
Latest version: 1.2.0


# curry-once

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Simple curry function.

## Installation

    $ npm install @micro-js/curry-once

## Usage

```js
var curry = require('@micro-js/curry-once')

var add = curry(function (a, b) {
  return a + b
})

var addOne = add(1)
addOne(1) // => 1

```

## API

### curry(fn)

- `fn` - function to curry

**Returns:** curried partial of `fn`

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/curry-once.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/curry-once
[git-image]: https://img.shields.io/github/tag/micro-js/curry-once.svg
[git-url]: https://github.com/micro-js/curry-once
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/curry-once.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/curry-once
npm package: @micro-js/evaluates
Description: Check if syntax is supported.
Latest version: 1.0.0


# evaluates

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Check if syntax is supported.

## Installation

    $ npm install @micro-js/evaluates

## Usage

```js
var evaluates = require('@micro-js/evaluates')

evaluates('function noop () {}') // => true
```

## API

### evaluates(code)

- `code` - code to check

**Returns:** boolean

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/evaluates.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/evaluates
[git-image]: https://img.shields.io/github/tag/micro-js/evaluates.svg
[git-url]: https://github.com/micro-js/evaluates
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/evaluates.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/evaluates
npm package: @micro-js/filter
Description: Filter for various data types.
Latest version: 1.0.0


# filter

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Filter for various data types.

## Installation

    $ npm install @micro-js/filter

## Usage

```js
var filter = require('@micro-js/filter')

filter(isEven, [1, 2, 3, 4, 5]) // -> [2, 4]
filter(isEven, {a: 1, b: 2, c: 3, d: 4, e: 5}) // -> {b: 2, d: 4}

function isEven (n) {
  return n % 2 === 0
}
```

## API

### filter(fn, val)

- `fn` - Predicate function. Called like `fn(val, key)` returns a boolean indicating whether to keep that key/value pair.
- `val` - A container of some kind (object or array at the moment)

**Returns:** A new container of the same type as `val` containing only the key/value pairs that `fn(val, key)` returned truthy for.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/filter.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/filter
[git-image]: https://img.shields.io/github/tag/micro-js/filter.svg
[git-url]: https://github.com/micro-js/filter
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/filter.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/filter
npm package: @micro-js/filter-array
Description: Functional, data-first array filter. Should also be faster than the native Array.prototype.filter
Latest version: 1.0.0


# filter-array

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Functional, data-first array filter. Should also be faster than the native Array.prototype.filter

## Installation

    $ npm install @micro-js/filter-array

## Usage

```js
var filterArray = require('@micro-js/filter-array')

filterArray(isEven, [1,2,3,4,5]) // -> [2, 4]

function isEven (n) {
  return n % 2 === 0
}
```

## API

### filterArray(fn, arr)

- `fn` - The predicate function that decides whether the value is kept. Receives `(value, index)` for each value in the array.

**Returns:** A new array containing only the values for which `fn(value, index)` returned truthy.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/filter-array.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/filter-array
[git-image]: https://img.shields.io/github/tag/micro-js/filter-array.svg
[git-url]: https://github.com/micro-js/filter-array
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/filter-array.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/filter-array
npm package: @micro-js/filter-obj
Description: Functional, data-last object filter.
Latest version: 1.0.0


# filter-obj

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Functional, data-last object filter.

## Installation

    $ npm install @micro-js/filter-obj

## Usage

```js
var filterObj = require('@micro-js/filter-obj')

filterObj(isEven, {a: 1, b: 2, c: 3, d: 4, e: 5}) // -> {b: 2, c: 4}

function isEven (n) {
  return n % 2 === 0
}

```

## API

### filterObj(fn, obj)

- `fn` - The predicate function. Receives `fn(val, key)` for each key/value pair in the object. Returns a bool indicating whether to keep it or not.
- `obj` - The object to filter

**Returns:** A new object containing only the key/value pairs that passed the `fn(val, key)` truth test (that it returned truthy for).

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/filter-obj.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/filter-obj
[git-image]: https://img.shields.io/github/tag/micro-js/filter-obj.svg
[git-url]: https://github.com/micro-js/filter-obj
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/filter-obj.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/filter-obj
npm package: @micro-js/flatten-gen
Description: Flatten a generator.
Latest version: 1.0.0


# flatten-gen

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Flatten a generator.

## Installation

    $ npm install @micro-js/flatten-gen

## Usage

```js
var flatten = require('@micro-js/flatten-gen')

let it = flatten(nested)()

// 1
it.next()
// 2
it.next()

function * nested () {
  yield 1
  yield two()
}

function * two () {
  yield 2
}
```

## API

### flattenGen(gen)

- `gen` - nested generator to flatten

**Returns:** a flattened generator

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/flatten-gen.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/flatten-gen
[git-image]: https://img.shields.io/github/tag/micro-js/flatten-gen.svg
[git-url]: https://github.com/micro-js/flatten-gen
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/flatten-gen.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/flatten-gen
npm package: @micro-js/foreach
Description: Fast for each.
Latest version: 1.1.0


# foreach

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Fast for each.

## Installation

    $ npm install @micro-js/foreach

## Usage

```js
var foreach = require('@micro-js/foreach')

var obj = {a: 1, b: 2}
var copy = {}

foreach(function (val, key) {
  copy[key] = val
})

copy // => {a: 1, b: 2}

```

## API

### foreach(fn, obj)

- `fn` - iterator
- `obj` - object to iterate over

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/foreach.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/foreach
[git-image]: https://img.shields.io/github/tag/micro-js/foreach.svg
[git-url]: https://github.com/micro-js/foreach
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/foreach.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/foreach
npm package: @micro-js/gen-to-promise
Description: Convert generator to promise.
Latest version: 1.0.0


# gen-to-promise

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Convert generator to promise.

## Installation

    $ npm install @micro-js/gen-to-promise

## Usage

```js
var genToPromise = require('@micro-js/gen-to-promise')

genToPromise(function * () {
  var students = yield fetch('/students').then((res) => res.json())
  var studentIds = students.map((student) => student.id)
  var teachers = yield fetch('/teachers.of', {body: {students: studentIds}}).then((res) => res.json())
  return teachers
}).then(function (teachers) {
  // teachers of students
})

```

## API

### genToPromise(gen)

- `gen` - generator

**Returns:** a promise with all the "yieldeds" in `gen` resolved

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/gen-to-promise.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/gen-to-promise
[git-image]: https://img.shields.io/github/tag/micro-js/gen-to-promise.svg
[git-url]: https://github.com/micro-js/gen-to-promise
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/gen-to-promise.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/gen-to-promise
npm package: @micro-js/get-prop
Description: Get nested property from object.
Latest version: 1.0.0


# get-prop

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Get nested property from object.

## Installation

    $ npm install @micro-js/get-prop

## Usage

```js
var getProp = require('@micro-js/get-prop')

var obj = {foo: {bar: 'baz'}}
getProp('foo.bar', obj) // => 'baz'
```

## API

### getProp(path, obj)

- `path` - array or dot seperated string specifying path
- `obj` - obj to retrieve property from

**Returns:** property

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/get-prop.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/get-prop
[git-image]: https://img.shields.io/github/tag/micro-js/get-prop.svg
[git-url]: https://github.com/micro-js/get-prop
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/get-prop.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/get-prop
npm package: @micro-js/handle-actions
Description: Compose a reducer from a map of action handlers
Latest version: 1.0.3


# handle-actions

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Compose a reducer from a map of action handlers.  Very similar to handleActions in [https://github.com/acdlite/redux-actions](redux-actions), but broken out as its own separate micro-module, and it also passes your handlers only `action.payload`.  Note, this obviously assumes that you are using the flux standard action style, of `type` for the identifier and `payload` for the contents of your message. This means your reducers will be unable to examine any other fields (e.g. meta) - if you want to use other fields, don't use this module.

## Installation

    $ npm install @micro-js/handle-actions

## Usage

```js
var handleActions = require('@micro-js/handle-actions')

handleActions({
  UPDATE_ITEM: (state, changes) {
    // action.type === 'UPDATE_ITEM'
    return {
      ...state,
      ...changes
    }
  }
})

```

## API

### handleActions(map, defaultState)

- `map` - Map of action types to handlers.
- `defaultState` - Optional default state. This is returned if `state` is undefined.

**Returns:** A composite reducer of the reducers in your map, scoped to their specified actions.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/handle-actions.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/handle-actions
[git-image]: https://img.shields.io/github/tag/micro-js/handle-actions.svg
[git-url]: https://github.com/micro-js/handle-actions
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/handle-actions.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/handle-actions
npm package: @micro-js/identity
Description: The identity function.
Latest version: 1.0.0


# identity

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

The identity function.

## Installation

    $ npm install @micro-js/identity

## Usage

```js
var identity = require('@micro-js/identity')

identity(1) // => 1
identity({}) // => {}
```

## API

### identity(val)

- `val` - any value

**Returns:** `val`

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/identity.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/identity
[git-image]: https://img.shields.io/github/tag/micro-js/identity.svg
[git-url]: https://github.com/micro-js/identity
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/identity.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/identity
npm package: @micro-js/is-array
Description: Functional version of Array.isArray
Latest version: 1.0.0


# is-array

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Functional version of Array.isArray

## Installation

    $ npm install @micro-js/is-array

## Usage

```js
var isArray = require('@micro-js/is-array')

isArray([]) === true
isArray({}) === false
```

## API

### isArray(val)

- `val` - An arbitrary value that may or may not be an array.

**Returns:** A boolean value indicating whether or not `val` is an array.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/is-array.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/is-array
[git-image]: https://img.shields.io/github/tag/micro-js/is-array.svg
[git-url]: https://github.com/micro-js/is-array
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@micro-js/is-array.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@micro-js/is-array