open-index/open-npm huggingface dataset:
npm package: @jswork/next-dt-log
Description: Datetime log for next.
Author: afei
Latest version: 1.1.3

# next-dt-log
> Datetime log for next.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-dt-log
```

## apis
| api  | params | description                  |
| ---- | ------ | ---------------------------- |
| date | msgs   | Print `date` prefix log.     |
| time | msgs   | Print `time` prefix log.     |
| dt   | msgs   | Print `datetime` prefix log. |

## usage
```js
import NxDtLog from '@jswork/next-dt-log';

const logger = new NxDtLog();

logger.time('i will print current time');
logger.date('i will print', 'current', 'date');
logger.dt('i will','print current datetime');

// [16:13:02] i will print current time
// [2020-11-13] i will print current date
// [2020-11-13 16:13:02] i will print current datetime

// Or simple to use static properties`log/error/info`:
NxDtLog.log.dt('i am from datetime logger.');
NxDtLog.error.dt('i am from datetime error.');
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-dt-log/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-dt-log
[version-url]: https://npmjs.org/package/@jswork/next-dt-log

[license-image]: https://img.shields.io/npm/l/@jswork/next-dt-log
[license-url]: https://github.com/afeiship/next-dt-log/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-dt-log
[size-url]: https://github.com/afeiship/next-dt-log/blob/master/dist/next-dt-log.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-dt-log
[download-url]: https://www.npmjs.com/package/@jswork/next-dt-log
npm package: @jswork/next-each-sibling
Description: Each sibling for next.
Author: afei
Latest version: 1.0.0

# next-each-sibling
> Each sibling for next.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-each-sibling
```

## usage
```js
import '@jswork/next-each-sibling';

const indexes = [4, 8, 12];
const res = [];
nx.eachSibling(indexes, (cur, next) => {
  res.push([cur, next]);
});

// result
[
  [4, 8],
  [8, 12]
];
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-each-sibling/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-each-sibling
[version-url]: https://npmjs.org/package/@jswork/next-each-sibling

[license-image]: https://img.shields.io/npm/l/@jswork/next-each-sibling
[license-url]: https://github.com/afeiship/next-each-sibling/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-each-sibling
[size-url]: https://github.com/afeiship/next-each-sibling/blob/master/dist/next-each-sibling.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-each-sibling
[download-url]: https://www.npmjs.com/package/@jswork/next-each-sibling
npm package: @jswork/next-element-in-viewport
Description: Detect element if is in viewport.
Author: afei
Latest version: 1.0.0

# next-element-in-viewport
> Detect element if is in viewport.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-element-in-viewport
```

## usage
```js
import '@jswork/next-element-in-viewport';

// scroll into view when element not in the viewport
const el = document.querySelector('.to-scroll-element');
if (el && !nx.elementInViewport(el)) {
  el.scrollIntoView();
}
```

## resources
- https://stackoverflow.com/questions/123999/how-can-i-tell-if-a-dom-element-is-visible-in-the-current-viewport

## license
Code released under [the MIT license](https://github.com/afeiship/next-element-in-viewport/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-element-in-viewport
[version-url]: https://npmjs.org/package/@jswork/next-element-in-viewport

[license-image]: https://img.shields.io/npm/l/@jswork/next-element-in-viewport
[license-url]: https://github.com/afeiship/next-element-in-viewport/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-element-in-viewport
[size-url]: https://github.com/afeiship/next-element-in-viewport/blob/master/dist/next-element-in-viewport.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-element-in-viewport
[download-url]: https://www.npmjs.com/package/@jswork/next-element-in-viewport
npm package: @jswork/next-emj-num
Description: Number for emoji.
Author: afei
Latest version: 1.0.2

# next-emj-num
> Number for emoji.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-emj-num
```

## usage
```js
import '@jswork/next-emj-num';

nx.emjNum(n);

// 0-10
// '0️⃣', '1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣', '7️⃣', '8️⃣', '9️⃣', '🔟'
// 1200 
// 1️⃣2️⃣0️⃣0️⃣
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-emj-num/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-emj-num
[version-url]: https://npmjs.org/package/@jswork/next-emj-num

[license-image]: https://img.shields.io/npm/l/@jswork/next-emj-num
[license-url]: https://github.com/afeiship/next-emj-num/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-emj-num
[size-url]: https://github.com/afeiship/next-emj-num/blob/master/dist/next-emj-num.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-emj-num
[download-url]: https://www.npmjs.com/package/@jswork/next-emj-num
npm package: @jswork/next-empty
Description: Empty array or object.
Author: afei
Latest version: 1.0.2

# next-empty
> Empty array or object.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-empty
```

## usage
```js
import '@jswork/next-empty';

nx.empty({ name:'afei' });   // {}
nx.empty([1,2,3]);           // []
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-empty/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-empty
[version-url]: https://npmjs.org/package/@jswork/next-empty

[license-image]: https://img.shields.io/npm/l/@jswork/next-empty
[license-url]: https://github.com/afeiship/next-empty/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-empty
[size-url]: https://github.com/afeiship/next-empty/blob/master/dist/next-empty.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-empty
[download-url]: https://www.npmjs.com/package/@jswork/next-empty
npm package: @jswork/next-escape-regexp
Description: Escape regexp for string.
Author: afei
Latest version: 1.0.0

# next-escape-regexp
> Escape regexp for string.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-escape-regexp
```

## usage
```js
import '@jswork/next-escape-regexp';

const str = 'How much $ for a 🦄?';
const res = nx.escapeRegexp(str);

// result:
// How much \\$ for a 🦄\\?
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-escape-regexp/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-escape-regexp
[version-url]: https://npmjs.org/package/@jswork/next-escape-regexp

[license-image]: https://img.shields.io/npm/l/@jswork/next-escape-regexp
[license-url]: https://github.com/afeiship/next-escape-regexp/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-escape-regexp
[size-url]: https://github.com/afeiship/next-escape-regexp/blob/master/dist/next-escape-regexp.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-escape-regexp
[download-url]: https://www.npmjs.com/package/@jswork/next-escape-regexp
npm package: @jswork/next-event-value
Description: Get event value from evet.target/detail/value.
Author: afei
Latest version: 1.0.2

# next-event-value
> Get event value from evet.target/detail/value.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-event-value
```

## usage
```js
import '@jswork/next-event-value';

const event1 = { target: { value: 111 } };
const event2 = { detail: { value: 222 } };
const event3 = true;
const event4 = { xxx: { yyy: { aaa: 'v4' } } };

nx.eventValue(event1) // 111
nx.eventValue(event2) // 222
nx.eventValue(event3) // true
nx.eventValue(event4, { path: 'xxx.yyy.aaa' }); // 'v4'
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-event-value/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-event-value
[version-url]: https://npmjs.org/package/@jswork/next-event-value

[license-image]: https://img.shields.io/npm/l/@jswork/next-event-value
[license-url]: https://github.com/afeiship/next-event-value/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-event-value
[size-url]: https://github.com/afeiship/next-event-value/blob/master/dist/next-event-value.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-event-value
[download-url]: https://www.npmjs.com/package/@jswork/next-event-value
npm package: @jswork/next-fanyi-api-sign
Description: Get baidu translate api sign.
Author: afei
Latest version: 1.0.2

# next-fanyi-api-sign
> Get baidu translate api sign.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fanyi-api-sign
```

## usage
```js
const options = { q: 'pear' };
const res = nx.fanyiApiSign(options);
const url = `http://api.fanyi.baidu.com/api/trans/vip/translate?from=en&to=zh&${nx.param(res)}`;

fetch(url)
  .then((response) => response.json())
  .then((response) => {
    expect(response).toEqual({
      from: 'en',
      to: 'zh',
      trans_result: [{ src: 'pear', dst: '梨' }]
    });
  });
```

## descriptions
1. 拼接字符串1
   1. appid=2015063000000001
   2. q=apple
   3. salt=1435660288
   4. 密钥=12345678
   5. 得到字符串1：“2015063000000001apple143566028812345678”
2. 计算签名：（对字符串1做md5加密）
   1. sign=md5(2015063000000001apple143566028812345678)
   2. sign=f89f9594663708c1605f3d736d01d2d4

## resources
- https://api.fanyi.baidu.com/doc/21

## license
Code released under [the MIT license](https://github.com/afeiship/next-fanyi-api-sign/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fanyi-api-sign
[version-url]: https://npmjs.org/package/@jswork/next-fanyi-api-sign

[license-image]: https://img.shields.io/npm/l/@jswork/next-fanyi-api-sign
[license-url]: https://github.com/afeiship/next-fanyi-api-sign/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fanyi-api-sign
[size-url]: https://github.com/afeiship/next-fanyi-api-sign/blob/master/dist/next-fanyi-api-sign.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fanyi-api-sign
[download-url]: https://www.npmjs.com/package/@jswork/next-fanyi-api-sign
npm package: @jswork/next-fetch-with-cancelable
Description: Cancelable fetch middleware for next.
Author: afei
Latest version: 1.0.12

# next-fetch-with-cancelable
> Cancelable fetch middleware for next.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-cancelable
```

## usage
```js
import '@jswork/next-fetch-with-cancelable';

const cancelableFetch = nx.fetchWithCancelable(fetch);
const fetchResource = cancelableFetch('https://api.github.com/users/afeiship', { cancelable: true })
  .then(res=>res.json())
  .then((res) => {
    console.log('response:', res);
  })
  .catch((err) => {
    console.log(err);
  });

// abort
fetchResource.cancel();
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-cancelable/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-cancelable
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-cancelable

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-cancelable
[license-url]: https://github.com/afeiship/next-fetch-with-cancelable/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-cancelable
[size-url]: https://github.com/afeiship/next-fetch-with-cancelable/blob/master/dist/next-fetch-with-cancelable.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-cancelable
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-cancelable
npm package: @jswork/next-fetch-with-content-type
Description: Request middleware for contentType.
Author: afei
Latest version: 1.0.10

# next-fetch-with-content-type
> Request middleware for contentType.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-content-type
```

## usage
```js
import '@jswork/next-fetch-with-content-type';

const betterFetch = nx.fetchWithContentType(fetch);
betterFetch('https://api.github.com/users/afeiship', { contentType: 'urlencoded' }).then(
  (res) => {
    // console.log(res);
  }
);
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-content-type/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-content-type
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-content-type

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-content-type
[license-url]: https://github.com/afeiship/next-fetch-with-content-type/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-content-type
[size-url]: https://github.com/afeiship/next-fetch-with-content-type/blob/master/dist/next-fetch-with-content-type.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-content-type
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-content-type
npm package: @jswork/next-fetch-with-debug
Description: Debug middleware for next fetch.
Author: afei
Latest version: 1.0.8

# next-fetch-with-debug
> Debug middleware for next fetch.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-debug
```

## usage
```js
import '@jswork/next-fetch-with-debug';
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-debug/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-debug
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-debug

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-debug
[license-url]: https://github.com/afeiship/next-fetch-with-debug/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-debug
[size-url]: https://github.com/afeiship/next-fetch-with-debug/blob/master/dist/next-fetch-with-debug.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-debug
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-debug
npm package: @jswork/next-fetch-with-delay
Description: Fetch with delay options.
Author: afei
Latest version: 1.0.7

# next-fetch-with-delay
> Fetch with delay options.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-delay
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-delay/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-delay
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-delay

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-delay
[license-url]: https://github.com/afeiship/next-fetch-with-delay/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-delay
[size-url]: https://github.com/afeiship/next-fetch-with-delay/blob/master/dist/next-fetch-with-delay.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-delay
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-delay
npm package: @jswork/next-fetch-with-node-timeout
Description: Timeout option for node-fetch with abort-controller.
Author: afei
Latest version: 1.0.0

# next-fetch-with-node-timeout
> Timeout option for node-fetch with abort-controller.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-node-timeout
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-node-timeout/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-node-timeout
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-node-timeout

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-node-timeout
[license-url]: https://github.com/afeiship/next-fetch-with-node-timeout/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-node-timeout
[size-url]: https://github.com/afeiship/next-fetch-with-node-timeout/blob/master/dist/next-fetch-with-node-timeout.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-node-timeout
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-node-timeout
npm package: @jswork/next-fetch-with-proxy
Description: Fetch with proxy options.
Author: afei
Latest version: 1.0.8

# next-fetch-with-proxy
> Fetch with proxy options.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-proxy
```

## resources
- https://github.com/TooTallNate/node-proxy-agent

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-proxy/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-proxy
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-proxy

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-proxy
[license-url]: https://github.com/afeiship/next-fetch-with-proxy/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-proxy
[size-url]: https://github.com/afeiship/next-fetch-with-proxy/blob/master/dist/next-fetch-with-proxy.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-proxy
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-proxy
npm package: @jswork/next-fetch-with-random-ua
Description: Random user-agent for fetch.
Author: afei
Latest version: 1.0.8

# next-fetch-with-random-ua
> Random user-agent for fetch.

<img src="https://tva1.sinaimg.cn/large/007S8ZIlgy1gg7qnfxszaj30rt03qwft.jpg" width="800" />

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-random-ua
```

## usage
```js
import '@jswork/next-fetch-with-random-ua';
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-random-ua/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-random-ua
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-random-ua

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-random-ua
[license-url]: https://github.com/afeiship/next-fetch-with-random-ua/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-random-ua
[size-url]: https://github.com/afeiship/next-fetch-with-random-ua/blob/master/dist/next-fetch-with-random-ua.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-random-ua
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-random-ua
npm package: @jswork/next-fetch-with-request-id
Description: Fetch with request id.
Author: afei
Latest version: 1.0.7

# next-fetch-with-request-id
> Fetch with request id.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-request-id
```

## usage
```js
import '@jswork/next-fetch-with-request-id';
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-request-id/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-request-id
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-request-id

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-request-id
[license-url]: https://github.com/afeiship/next-fetch-with-request-id/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-request-id
[size-url]: https://github.com/afeiship/next-fetch-with-request-id/blob/master/dist/next-fetch-with-request-id.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-request-id
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-request-id
npm package: @jswork/next-fetch-with-response-type
Description: Request middleware for responseType.
Author: afei
Latest version: 1.0.10

# next-fetch-with-response-type
> Request middleware for responseType.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-response-type
```

## usage
```js
import '@jswork/next-fetch-with-response-type';

const betterFetch = nx.fetchWithResponseType(global.fetch);

betterFetch('https://jsonplaceholder.typicode.com/posts/1', { responseType:'json' }).then(res=>{
  console.log('res:', res)
})
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-response-type/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-response-type
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-response-type

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-response-type
[license-url]: https://github.com/afeiship/next-fetch-with-response-type/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-response-type
[size-url]: https://github.com/afeiship/next-fetch-with-response-type/blob/master/dist/next-fetch-with-response-type.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-response-type
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-response-type
npm package: @jswork/next-fetch-with-retry
Description: Fetch with try for next.
Author: afei
Latest version: 1.0.10

# next-fetch-with-retry
> Fetch with try for next.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-retry
```

## usage
```js
import '@jswork/next-fetch-with-retry';

const betterFetch = nx.fetchWithRetry(fetch);

betterFetch('https://www.google1.com/')
  .catch((err) => {
    console.log('err::::', err);
  });
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-retry/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-retry
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-retry

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-retry
[license-url]: https://github.com/afeiship/next-fetch-with-retry/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-retry
[size-url]: https://github.com/afeiship/next-fetch-with-retry/blob/master/dist/next-fetch-with-retry.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-retry
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-retry
npm package: @jswork/next-fetch-with-timeout
Description: Fetch with timeout options.
Author: afei
Latest version: 1.0.13

# next-fetch-with-timeout
> Fetch with timeout options.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fetch-with-timeout
```

## usage
```js
import '@jswork/next-fetch-with-timeout';

const betterFetch = nx.fetchWithTimeout(fetch);
betterFetch('https://api.github.com/users/afeiship').then(res=>res.json()).then(res=>{
  console.log(res);
})
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fetch-with-timeout/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fetch-with-timeout
[version-url]: https://npmjs.org/package/@jswork/next-fetch-with-timeout

[license-image]: https://img.shields.io/npm/l/@jswork/next-fetch-with-timeout
[license-url]: https://github.com/afeiship/next-fetch-with-timeout/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fetch-with-timeout
[size-url]: https://github.com/afeiship/next-fetch-with-timeout/blob/master/dist/next-fetch-with-timeout.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fetch-with-timeout
[download-url]: https://www.npmjs.com/package/@jswork/next-fetch-with-timeout
npm package: @jswork/next-file-md5
Description: Get md5 hash for file.
Author: afei
Latest version: 1.0.0

# next-file-md5
> Get md5 hash for file.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-file-md5
```

## usage
```js
import '@jswork/next-file-md5';

nx.fileMd5('jest.config.js');
// 06b6d5917e8bcf11f31706244a0e6532
```

## resources
- https://itbilu.com/nodejs/npm/Nk-6MeQ9.html

## license
Code released under [the MIT license](https://github.com/afeiship/next-file-md5/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-file-md5
[version-url]: https://npmjs.org/package/@jswork/next-file-md5

[license-image]: https://img.shields.io/npm/l/@jswork/next-file-md5
[license-url]: https://github.com/afeiship/next-file-md5/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-file-md5
[size-url]: https://github.com/afeiship/next-file-md5/blob/master/dist/next-file-md5.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-file-md5
[download-url]: https://www.npmjs.com/package/@jswork/next-file-md5
npm package: @jswork/next-file-to-base64
Description: File to base64 based on FileReader for next.
Author: afei
Latest version: 1.0.0

# next-file-to-base64
> File to base64 based on FileReader for next.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-file-to-base64
```

## usage
```js
import '@jswork/next-file-to-base64';

nx.fileToBase64(inFile).then((base64)=>{
  console.log(base64);
});
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-file-to-base64/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-file-to-base64
[version-url]: https://npmjs.org/package/@jswork/next-file-to-base64

[license-image]: https://img.shields.io/npm/l/@jswork/next-file-to-base64
[license-url]: https://github.com/afeiship/next-file-to-base64/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-file-to-base64
[size-url]: https://github.com/afeiship/next-file-to-base64/blob/master/dist/next-file-to-base64.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-file-to-base64
[download-url]: https://www.npmjs.com/package/@jswork/next-file-to-base64
npm package: @jswork/next-file-upload
Description: Simple xhr for file upload.
Author: afei
Latest version: 1.0.3

# next-file-upload
> Simple xhr for file upload.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-file-upload
```

## usage
```js
import '@jswork/next-file-upload';

nx.fileUpload('/api/upload', { file: inFile }).then(function(response) {
  console.log(response);
});
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-file-upload/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-file-upload
[version-url]: https://npmjs.org/package/@jswork/next-file-upload

[license-image]: https://img.shields.io/npm/l/@jswork/next-file-upload
[license-url]: https://github.com/afeiship/next-file-upload/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-file-upload
[size-url]: https://github.com/afeiship/next-file-upload/blob/master/dist/next-file-upload.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-file-upload
[download-url]: https://www.npmjs.com/package/@jswork/next-file-upload
npm package: @jswork/next-filepath-mv
Description: Filepath rename for next.
Author: afei
Latest version: 1.0.0

# next-filepath-mv
> Filepath rename for next.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-filepath-mv
```

## usage
```js
import '@jswork/next-filepath-mv';

//DOCS here!
nx.filepathMv('/var/lib/nginx/tmp/test.txt',(obj)=>{
  obj.prefix = 'pre_';
  obj.suffix = '_suf';
  obj.name = 'test123';
  return obj;
});

// /var/lib/nginx/tmp/pre_test123_suf.txt
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-filepath-mv/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-filepath-mv
[version-url]: https://npmjs.org/package/@jswork/next-filepath-mv

[license-image]: https://img.shields.io/npm/l/@jswork/next-filepath-mv
[license-url]: https://github.com/afeiship/next-filepath-mv/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-filepath-mv
[size-url]: https://github.com/afeiship/next-filepath-mv/blob/master/dist/next-filepath-mv.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-filepath-mv
[download-url]: https://www.npmjs.com/package/@jswork/next-filepath-mv
npm package: @jswork/next-filesize
Description: Get filesize based on filesize lib.
Author: afei
Latest version: 1.0.3

# next-filesize
> Get filesize based on filesize lib.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-filesize
```

## usage
```js
import '@jswork/next-filesize';

nx.filesize('/page/testfile.js', { bits: true });
// { size: 421, sizeOf: '3.29Kb' }
```

## resources
- https://github.com/avoidwork/filesize.js
- https://stackoverflow.com/questions/42363140/how-to-find-the-size-of-the-file-in-node-js


## license
Code released under [the MIT license](https://github.com/afeiship/next-filesize/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-filesize
[version-url]: https://npmjs.org/package/@jswork/next-filesize

[license-image]: https://img.shields.io/npm/l/@jswork/next-filesize
[license-url]: https://github.com/afeiship/next-filesize/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-filesize
[size-url]: https://github.com/afeiship/next-filesize/blob/master/dist/next-filesize.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-filesize
[download-url]: https://www.npmjs.com/package/@jswork/next-filesize
npm package: @jswork/next-filter
Description: Filter for next.
Author: afei
Latest version: 1.0.0

# next-filter
> Filter for next.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-filter
```

## usage
```js
import '@jswork/next-filter';

// single filter
const res1 = nx.filter('aaa', [addMore(111, 999)]);                 

//res1: '111aaa999'

// multiple filter
const res2 = nx.filter('aaa', [ 
  addMore(111, 999), 
  addZero() 
]);    

//res2: 0111aaa9990
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-filter/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-filter
[version-url]: https://npmjs.org/package/@jswork/next-filter

[license-image]: https://img.shields.io/npm/l/@jswork/next-filter
[license-url]: https://github.com/afeiship/next-filter/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-filter
[size-url]: https://github.com/afeiship/next-filter/blob/master/dist/next-filter.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-filter
[download-url]: https://www.npmjs.com/package/@jswork/next-filter
npm package: @jswork/next-filter-map
Description: Filter after map for next use reduce.
Author: afei
Latest version: 1.2.3

# next-filter-map
> Filter after map for next use reduce.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-filter-map
```

## usage
```js
import '@jswork/next-filter-map';

const options = [
  { name: 'One', assigned: true },
  { name: 'Two', assigned: false },
  { name: 'Three', assigned: true }
];

const reduced = nx.filterMap(
  options,
  (item) => {
    return [item.assigned, { name: item.name }];
  }
);

// [ { name: 'One' }, { name: 'Three' } ]
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-filter-map/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-filter-map
[version-url]: https://npmjs.org/package/@jswork/next-filter-map

[license-image]: https://img.shields.io/npm/l/@jswork/next-filter-map
[license-url]: https://github.com/afeiship/next-filter-map/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-filter-map
[size-url]: https://github.com/afeiship/next-filter-map/blob/master/dist/next-filter-map.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-filter-map
[download-url]: https://www.npmjs.com/package/@jswork/next-filter-map
npm package: @jswork/next-filter-nil
Description: Filter null/undefined value.
Author: afei
Latest version: 1.0.0

# next-filter-nil
> Filter null/undefined value.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-filter-nil
```

## usage
```js
import '@jswork/next-filter-nil';

nx.filterNil({
  left: null,
  right: 0,
  title: {
    text: '堆叠区域图'
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'cross',
      label: {
        left: null,
        right: 10,
        backgroundColor: '#6a7985'
      }
    }
  },
  legend: {
    data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
  },
  toolbox: {
    feature: {
      saveAsImage: {
        target: null
      }
    }
  }
},null);


// ================= result  ================= 
{
  right: 0,
  title: {
    text: '堆叠区域图'
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      type: 'cross',
      label: {
        right: 10,
        backgroundColor: '#6a7985'
      }
    }
  },
  legend: {
    data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
  },
  toolbox: {
    feature: {
      saveAsImage: { }
    }
  }
}
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-filter-nil/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-filter-nil
[version-url]: https://npmjs.org/package/@jswork/next-filter-nil

[license-image]: https://img.shields.io/npm/l/@jswork/next-filter-nil
[license-url]: https://github.com/afeiship/next-filter-nil/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-filter-nil
[size-url]: https://github.com/afeiship/next-filter-nil/blob/master/dist/next-filter-nil.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-filter-nil
[download-url]: https://www.npmjs.com/package/@jswork/next-filter-nil
npm package: @jswork/next-find
Description: Find value by path.
Author: afei
Latest version: 1.0.0

# next-find
> Find value by path.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-find
```

## usage
```js
import '@jswork/next-find';

const users = [
  { 'user': 'barney',  'age': 36, 'active': true },
  { 'user': 'fred',    'age': 40, 'active': false },
  { 'user': 'pebbles', 'age': 1,  'active': true }
];

const result = nx.find(users, function(chr) {
  return chr.age < 40;
},'user');

// 'barney'
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-find/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-find
[version-url]: https://npmjs.org/package/@jswork/next-find

[license-image]: https://img.shields.io/npm/l/@jswork/next-find
[license-url]: https://github.com/afeiship/next-find/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-find
[size-url]: https://github.com/afeiship/next-find/blob/master/dist/next-find.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-find
[download-url]: https://www.npmjs.com/package/@jswork/next-find
npm package: @jswork/next-flat
Description: Flattens `array` a single or multiple level deep.
Author: afei
Latest version: 1.0.3

# next-flat
> Flattens `array` a single or multiple level deep.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-flat
```

## usage
```js
import '@jswork/next-flat';

const res = nx.flat([[1, 2, 3], [4, 5]]); 
// [1, 2, 3, 4, 5]
```

## other solution
```js
function flattenArrayOfArrays(a, r) {
  if (!r) { r = [] }
  for (var i = 0; i < a.length; i++) {
    if (a[i].constructor == Array) {
      r.concat(flattenArrayOfArrays(a[i], r));
    } else {
      r.push(a[i]);
    }
  }
  return r;
}
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-flat/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-flat
[version-url]: https://npmjs.org/package/@jswork/next-flat

[license-image]: https://img.shields.io/npm/l/@jswork/next-flat
[license-url]: https://github.com/afeiship/next-flat/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-flat
[size-url]: https://github.com/afeiship/next-flat/blob/master/dist/next-flat.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-flat
[download-url]: https://www.npmjs.com/package/@jswork/next-flat
npm package: @jswork/next-flatten
Description: Flattens `array` a single or multiple level deep.
Author: afei
Latest version: 1.0.2

# next-flatten
> Flattens `array` a single or multiple level deep.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-flatten
```

## usage
```js
import '@jswork/next-flatten';

const res = nx.flatten([[1, 2, 3], [4, 5]]); 
// [1, 2, 3, 4, 5]
```

## other solution
```js
function flattenArrayOfArrays(a, r) {
  if (!r) { r = [] }
  for (var i = 0; i < a.length; i++) {
    if (a[i].constructor == Array) {
      r.concat(flattenArrayOfArrays(a[i], r));
    } else {
      r.push(a[i]);
    }
  }
  return r;
}
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-flatten/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-flatten
[version-url]: https://npmjs.org/package/@jswork/next-flatten

[license-image]: https://img.shields.io/npm/l/@jswork/next-flatten
[license-url]: https://github.com/afeiship/next-flatten/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-flatten
[size-url]: https://github.com/afeiship/next-flatten/blob/master/dist/next-flatten.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-flatten
[download-url]: https://www.npmjs.com/package/@jswork/next-flatten
npm package: @jswork/next-form2data
Description: FormData to js data.
Author: afei
Latest version: 1.0.1

# next-form2data
> FormData to js data.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-form2data
```

## usage
```js
// DO NOT USE in NODE ENV (because: form-data package has bug.)
import nxForm2Data from '@jswork/next-form2data';

const formData = new FormData();
formData.append('u', 'username');
formData.append('p', 'pass1');
nx.form2data(formData);

// { u: 'username', p: 'pass1' }
```

## resources
- https://stackoverflow.com/questions/41431322/how-to-convert-formdatahtml5-object-to-json

## license
Code released under [the MIT license](https://github.com/afeiship/next-form2data/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-form2data
[version-url]: https://npmjs.org/package/@jswork/next-form2data

[license-image]: https://img.shields.io/npm/l/@jswork/next-form2data
[license-url]: https://github.com/afeiship/next-form2data/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-form2data
[size-url]: https://github.com/afeiship/next-form2data/blob/master/dist/next-form2data.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-form2data
[download-url]: https://www.npmjs.com/package/@jswork/next-form2data
npm package: @jswork/next-fs-open
Description: Open/read file from local or remote.
Author: afei
Latest version: 1.0.4

# next-fs-open
> Open/read file from local or remote.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fs-open
```

## apis
| api      | params       | description                  |
| -------- | ------------ | ---------------------------- |
| from     | url/filename | Read file from filename/url. |
| fromUrl  | url          | Read file from url.          |
| fromFile | filename     | Read file from filename.     |

## usage
```js
import NxFsOpen from '@jswork/next-fs-open';

NxFsOpen.from('https://pic.rmb.bdstatic.com/7f7a8d7b247d3aa430010f10a5765239.jpeg');

// <Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 01 00 48 00 48 00 00 ff db 00 43 00 08 06 06 07 06 05 08 07 07 07 09 09 08 0a 0c 14 0d 0c 0b 0b 0c 19 12 13 0f ... 10230 more bytes>
```

## license
Code released under [the MIT license](https://github.com/afeiship/next-fs-open/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fs-open
[version-url]: https://npmjs.org/package/@jswork/next-fs-open

[license-image]: https://img.shields.io/npm/l/@jswork/next-fs-open
[license-url]: https://github.com/afeiship/next-fs-open/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fs-open
[size-url]: https://github.com/afeiship/next-fs-open/blob/master/dist/next-fs-open.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fs-open
[download-url]: https://www.npmjs.com/package/@jswork/next-fs-open
npm package: @jswork/next-fs-read
Description: Read file with fs for next.
Author: afei
Latest version: 1.0.4

# next-fs-read
> Read file with fs for next.

[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]

## installation
```bash
npm install -S @jswork/next-fs-read
```

## usage
```js
import '@jswork/next-fs-read';

nx.fsRead('./__tests__/E201.lrc', { charset: 'utf8' });
/*
[00:02.00]Unit 1 Hello 第一单元 你好
[00:04.06]Hi, I'm Mocky. 嗨，我是Mocky。
[00:07.33]Hello, Mocky. 你好，Mocky。
[00:10.84]Learn to say. 学着说。（听力练习）

*/
```

## options
| name         | type   | default | description                         |
| ------------ | ------ | ------- | ----------------------------------- |
| charset      | string | utf-8   | Content charset.                    |
| responseType | string | string  | Results type(string/json/array). |

## license
Code released under [the MIT license](https://github.com/afeiship/next-fs-read/blob/master/LICENSE.txt).

[version-image]: https://img.shields.io/npm/v/@jswork/next-fs-read
[version-url]: https://npmjs.org/package/@jswork/next-fs-read

[license-image]: https://img.shields.io/npm/l/@jswork/next-fs-read
[license-url]: https://github.com/afeiship/next-fs-read/blob/master/LICENSE.txt

[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-fs-read
[size-url]: https://github.com/afeiship/next-fs-read/blob/master/dist/next-fs-read.min.js

[download-image]: https://img.shields.io/npm/dm/@jswork/next-fs-read
[download-url]: https://www.npmjs.com/package/@jswork/next-fs-read