open-index/open-npm huggingface dataset:
npm package: @feizheng/next-range
Description: Range array with step for javascript.
Author: afei
Latest version: 2.0.0

# next-range
> Range array with step for javascript.

[![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 @feizheng/next-range
```

## apis
| api     | params            | description             |
| ------- | ----------------- | ----------------------- |
| range | start, stop, step | Create integer by range |

## usage
```js
import '@feizheng/next-range';

nx.range(1,10);

// [1,2,3,4,5,6,7,8,9,10]
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-range
[download-url]: https://www.npmjs.com/package/@feizheng/next-range
npm package: @feizheng/next-react-mobx
Description: Next toolkit for mobx app.
Author: afei
Latest version: 1.0.1

# next-react-mobx
> Next toolkit for mobx app.

## installation
```bash
npm install -S @feizheng/next-react-mobx
```

## apis
| api       | params | description     |
| --------- | ------ | --------------- |
| bootstrap | -      | Add $app/$store |

## usage
```js
import NxReactMobx from '@feizheng/next-react-mobx';

// code goes here:
```
npm package: @feizheng/next-react-redux
Description: React redux enhanced version based on next toolkit.
Author: feizheng
Latest version: 3.0.2

# next-react-redux
> React redux enhanced version based on next toolkit.

## installation
```shell
npm i @feizheng/next-react-redux
```

## options
| name        | type   | value | description                           |
| :---------- | :----- | :---- | :------------------------------------ |
| nx.$memory  | Object | {}    | Application memory data storage       |
| nx.$local   | Object | null  | Application localStoarage             |
| nx.$session | Object | {}    | Application sessionStoreage           |
| nx.$global  | Object | {}    | Application set/get global properties |
| nx.$app     | Object | {}    | Application instance                  |


## get-started
+ HTML
```html
<main id="app"></main>
```

+ index.js
```javascript
import  { $api, $config, $store } from '#';
import { HashRouter as Router, Switch } from 'react-router-dom';
import { renderRoutes } from 'react-router-config';
import routes from './routes';
import { ReduxAppBase, ReduxBoot, reduxRender } from '@feizheng/next-react-redux';
import 'assets/styles/index.scss';

// DO NOT USE `@hotable`
@reduxRender('app', { prefix: 'react-spa', loadable: false })
export default class extends ReduxAppBase {
  static initialState(inStore) {
    const { login } = inStore.local;
    return {
      local: {
        login: login || null
      },
      memory: {
        modalUser: false,
        modalUserQuery: false
      }
    };
  }

  componentDidMount() {
    const { history } = this.root;
    nx.$global = { 'abc.test': 123 };
    nx.$memory = { history };
  }

  eventBus(inName, inData) {
    console.log('*, I am - global event bus center:->', inName, inData);
  }

  render() {
    return (
      <Router ref={(root) => (this.root = root)}>
        <Switch>{renderRoutes(routes)}</Switch>
      </Router>
    );
  }
}
```
npm package: @feizheng/next-redirect-to
Description: Redirect to path.
Author: afei
Latest version: 1.0.3

# next-redirect-to
> Redirect to path.

## installation
```bash
npm install -S @feizheng/next-redirect-to
```

## usage
```js
import '@feizheng/next-redirect-to';

// history is required:
nx.redirectTo({ from: '/', to: '/home', replace: true, hisotry: null })
```
npm package: @feizheng/next-redirect2url
Description: Redirect url encode/decode.
Author: afei
Latest version: 1.0.2

# next-redirect2url
> Redirect url encode/decode.

[![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 @feizheng/next-redirect2url
```

## apis
| api    | params | description   |
| ------ | ------ | ------------- |
| encode | -      | desc balabala |
| decode | -      | desc balabala |

## options - encode
| name   | default            | description                      |
| ------ | ------------------ | -------------------------------- |
| query  | 'rediect'          | The query key string             |
| encode | encodeURIComponent | The default value encode method. |
| source | -                  | The url.                         |
| target | -                  | The redirect url.                |


## options - decode

| name   | default            | description                      |
| ------ | ------------------ | -------------------------------- |
| query  | 'rediect'          | The query key string             |
| decode | decodeURIComponent | The default value decode method. |
| url    | -                  | The target url.                  |

## usage
```js
import NxRedirect2url from '@feizheng/next-redirect2url';

const str = NxRedirect2url.encode({
  source: 'http://192.168.50.181/login',
  target: 'https://www.mipengine.org?q1=1&q2=2',
});

//  'http://192.168.50.181/login?redirect=https%3A%2F%2Fwww.mipengine.org%3Fq1%3D1%26q2%3D2'


const res = NxRedirect2url.decode({
  url: 'http://192.168.50.181/login?redirect=https%3A%2F%2Fwww.mipengine.org%3Fq1%3D1%26q2%3D2',
});

/*
{
  target: 'https://www.mipengine.org?q1=1&q2=2',
  source: 'http://192.168.50.181/login'
}
*/
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-redirect2url
[download-url]: https://www.npmjs.com/package/@feizheng/next-redirect2url
npm package: @feizheng/next-remove
Description: Remove a item from array based on next.
Author: afei
Latest version: 1.0.0

# next-remove
> Remove a item from array based on next.

## installation
```bash
npm install -S @feizheng/next-remove
```

## usage
```js
import '@feizheng/next-remove';

const ary1 = [1,2,3,4,5];
const ary2 = [
  { key: 1, value: 'value1' },
  { key: 2, value: 'value2' },
  { key: 3, value: 'value3' },
  { key: 4, value: 'value4' }
];

// 1. remove pure item:
nx.remove(ary1, [1,2,3]);
// result:
[4,5]


// 2. remove by a filter:
nx.remove(ary2, (_,item)=>{
  return item.key>2;
});

// result:
[
  { key: 1, value: 'value1' },
  { key: 2, value: 'value2' },
]
```
npm package: @feizheng/next-repeat-by
Description: Repeat by for next.
Author: afei
Latest version: 1.1.1

# next-repeat-by
> Repeat by for next.

## installation
```bash
npm install -S @feizheng/next-repeat-by
```

## usage
```js
import '@feizheng/next-repeat-by';

//DOCS here!
```
npm package: @feizheng/next-require
Description: Require multiple package.
Author: afei
Latest version: 1.1.0

# next-require
> Require multiple package.

## installation
```bash
npm install -S @feizheng/next-require
```

## usage
```js
import '@feizheng/next-require';

// load @feizheng/next-packages defaults.
nx.require();
```

## resources
- https://github.com/jackfranklin/gulp-load-plugins
npm package: @feizheng/next-rollup-banner
Description: Rollup banner for next.
Author: afei
Latest version: 1.0.2

# next-rollup-banner
> Rollup banner 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 @feizheng/next-rollup-banner
```

## usage
```js
import '@feizheng/next-rollup-banner';

nx.rollupBanner();

/*
     name: <%= pkg.name %>
     description: <%= pkg.description %>
     homepage: <%= pkg.homepage %>
     version: <%= pkg.version %>
     date: 2020-07-09T13:42:26.535Z
     license: <%= pkg.license %>
*/
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-rollup-banner
[download-url]: https://www.npmjs.com/package/@feizheng/next-rollup-banner
npm package: @feizheng/next-runner
Description: Task runnter for next.
Author: afei
Latest version: 1.0.0

# next-runner
> Task runnter for next.

## installation
```bash
npm install -S @feizheng/next-runner
```

## apis
| api      | params | description   |
| -------- | ------ | ------------- |
| parallel | -      | desc balabala |
| serial   | -      | desc balabala |

## usage
```js
import NxRunner from '@feizheng/next-runner';

// code goes here:
```

## resources
- https://github.com/nuxt-contrib/items-promise/blob/master/lib/index.js
npm package: @feizheng/next-safe-assign
Description: Safe assign for next.
Author: afei
Latest version: 1.0.2

# next-safe-assign
> Safe assign for next.

## installation
```bash
npm install -S @feizheng/next-safe-assign
```

## usage
```js
import '@feizheng/next-safe-assign';

const res = safeAssign(
  {
    a: 1,
    b: 2
  },
  {
    c: 2,
    a: ''
  },
  (key, value) => {
    // you can customize your ignore function
    return value == null;
  }
);

// { a: '', b: 2, c: 2 }
```

## resources
- https://github.com/zmen/safe-assign
npm package: @feizheng/next-sample
Description: Get an/some element from array like target.
Author: afei
Latest version: 1.2.2

# next-sample
> Get an/some element from array like target.

[![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 @feizheng/next-sample
```

## usage
```js
import '@feizheng/next-sample';

const arr = [1,2,3,4,5,6,7];

nx.sample(arr); // 2
nx.sample(arr); // 5

nx.sample(arr, 1); // [5]
nx.sample(arr, 2); // [1, 2]
nx.sample(arr, 2); // [3, 6]
nx.sample(arr, 2); // [5, 6]
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-sample
[download-url]: https://www.npmjs.com/package/@feizheng/next-sample
npm package: @feizheng/next-scroll-to
Description: Scroll to api.
Author: afei
Latest version: 1.0.1

# next-scroll-to
> Scroll to api.

## installation
```bash
npm install -S @feizheng/next-scroll-to
```

## usage
```js
import '@feizheng/next-scroll-to';

// top/bottom/number
nx.scrollTo({ el: document.querySelector('.abc'), to: 'top' });
nx.scrollTo({ el: document.querySelector('.abc'), to: 'bottom' });
nx.scrollTo({ el: document.querySelector('.abc'), to: 1000 });
```

## set `scroll-behavior: smooth;`
> Use css3 smooth-scroller.
npm package: @feizheng/next-secret-tmpl
Description: Secret template engine.
Author: afei
Latest version: 1.0.1

# next-secret-tmpl
> Secret template engine.

[![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 @feizheng/next-secret-tmpl
```

## usage
```js
import '@feizheng/next-secret-tmpl';

const str = '${{ GITHUB_API_TOKEN }} - ${{ afei }}';
const ctx = { GITHUB_API_TOKEN: 'xxx-yyy-zzz', afei:'zhengfei' };
const res = nx.secretTmpl(str, ctx);

// xxx-yyy-zzz - zhengfei
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-secret-tmpl
[download-url]: https://www.npmjs.com/package/@feizheng/next-secret-tmpl
npm package: @feizheng/next-sets
Description: Set a lot value value.
Author: afei
Latest version: 1.0.1

# next-sets
> Set a lot value value.

## installation
```bash
npm install -S @feizheng/next-sets
```

## usage
```js
import '@feizheng/next-sets';

const obj = {};

nx.sets(obj, {
  testA: 'A1',
  testB: 'B1',
  testC: 'C1',
  testD: 'D1',
  'path.key1.a.b': 'b-value1'
});
```
npm package: @feizheng/next-shuffle
Description: Shuffle an array.
Author: afei
Latest version: 1.0.0

# next-shuffle
> Shuffle an array.

## installation
```bash
npm install -S @feizheng/next-shuffle
```

## usage
```js
import '@feizheng/next-shuffle';

//DOCS here!
```

## another solution:
```js
function shuffleUseSort(aArr){
    return aArr.sort(function(a, b){
        return (0.5 - Math.random());
    });
}
```

## resources:
- http://zpz.name/562/
- http://caibaojian.com/js-random-array.html
npm package: @feizheng/next-slice2str
Description: Slice string to two part.
Author: afei
Latest version: 1.0.2

# next-slice2str
> Slice string to two part.

[![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 @feizheng/next-slice2str
```

## usage
```js
import '@feizheng/next-slice2str';

//DOCS here!
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-slice2str
[download-url]: https://www.npmjs.com/package/@feizheng/next-slice2str
npm package: @feizheng/next-spider-fetch
Description: Fetch special for spider.
Author: afei
Latest version: 1.2.0

# next-spider-fetch
> Fetch special for spider.

[![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 @feizheng/next-spider-fetch
```

## usage
```js
import '@feizheng/next-spider-fetch';

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

## options
| name    | type    | description            |
| ------- | ------- | ---------------------- |
| timeout | Number  | Timeout for fetch.     |
| delay   | Number  | Request with delay.    |
| proxy   | String  | Set proxy for request. |
| debug   | Boolean | If debug the options.  |

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-spider-fetch
[download-url]: https://www.npmjs.com/package/@feizheng/next-spider-fetch
npm package: @feizheng/next-spys-port-decode
Description: Spys port decode.
Author: afei
Latest version: 1.1.1

# next-spys-port-decode
> Spys port decode.

[![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 @feizheng/next-spys-port-decode
```

## usage
```js
import '@feizheng/next-spys-port-decode';

//DOCS here!
```

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

[version-image]: https://img.shields.io/npm/v/@feizheng/next-spys-port-decode
[version-url]: https://npmjs.org/package/@feizheng/next-spys-port-decode

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-spys-port-decode
[download-url]: https://www.npmjs.com/package/@feizheng/next-spys-port-decode
npm package: @feizheng/next-stub
Description: Stub code for next.
Author: afei
Latest version: 1.1.1

# next-stub
> Stub code 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 @feizheng/next-stub
```

## apis
| api           | description               |
|---------------|---------------------------|
| nx.stubString | Stub empty and new string |
| nx.stubArray  | Stub empty and new array  |
| nx.stubObject | Stub empty and new object |
| nx.stubThen   | Stub empty and new then   |

## usage
```js
import '@feizheng/next-stub';

//DOCS here!
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-stub
[download-url]: https://www.npmjs.com/package/@feizheng/next-stub
npm package: @feizheng/next-stub-singleton
Description: Stub code for singleton.
Author: afei
Latest version: 1.1.1

# next-stub-singleton
> Stub code for singleton.

## installation
```bash
npm install -S @feizheng/next-stub-singleton
```

## usage
```js
import '@feizheng/next-stub-singleton';

class App {}
Object.assign(App, nx.stubSingleton());
export default App;


// stub code:
{
  instance: null,
  getInstance: function() {
    if (!this.instance) {
      this.instance = new this();
    }
    return this.instance;
  }
}
```

## resources
- https://stackoverflow.com/questions/1606797/use-of-apply-with-new-operator-is-this-possible
npm package: @feizheng/next-sum
Description: Gets the sum of the values in collection.
Author: afei
Latest version: 1.0.0

# next-sum
> Gets the sum of the values in collection.

[![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 @feizheng/next-sum
```

## usage
```js
import '@feizheng/next-sum';

const arr1 = [1, 2, 3, 4, 5];
const arr2 = [
  { key: '1', value: 111 },
  { key: '2', value: 222 },
  { key: '3', value: 333 },
  { key: '4', value: 444 }
];
const arr3 = [
  { key: 1, value: 111 },
  { key: 2, value: null },
  { key: 3, value: 2 },
  { key: 3, value: 'abc555' }
];

// simple
nx.sum(arr1);   // 15
nx.sum(arr2, 'value'); // 1110

// with callback
nx.sum(arr3, function (_, item) {
  var val = parseInt(item.value, 10);
  return val ? val : 0;
});

// 113
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-sum
[download-url]: https://www.npmjs.com/package/@feizheng/next-sum
npm package: @feizheng/next-swap
Description: Array swap for next.
Author: afei
Latest version: 1.0.1

# next-swap
> Array swap 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 @feizheng/next-swap
```

## usage
```js
import '@feizheng/next-swap';

const arr = [1, 2, 3, 4];
nx.swap(arr, 0, 3);

// [4, 2, 3, 1]
```

## resources
- https://www.c-sharpcorner.com/blogs/swap-array-elements-in-javascript-using-array-prototype-and-other-methods
- https://dmitripavlutin.com/swap-variables-javascript/

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-swap
[download-url]: https://www.npmjs.com/package/@feizheng/next-swap
npm package: @feizheng/next-tally
Description: Which group and count elements of the collection.
Author: afei
Latest version: 1.0.0

# next-tally
> Which group and count elements of the collection.

[![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 @feizheng/next-tally
```

## usage
```js
import '@feizheng/next-tally';


nx.tally([null, undefined, false, true, true, null, true, 1]);
// { '1': 1, null: 2, undefined: 1, false: 1, true: 3 }
```

## resources
- https://medium.com/@baweaver/ruby-2-7-enumerable-tally-a706a5fb11ea

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-tally
[download-url]: https://www.npmjs.com/package/@feizheng/next-tally
npm package: @feizheng/next-time-chunk
Description: Split time to chunks for next.
Author: afei
Latest version: 1.0.1

# next-time-chunk
> Split time to chunks for next.

[![npm][npm-image]][npm-url]
[![licence][licence-image]][license-url]

## installation
```bash
npm install -S @feizheng/next-time-chunk
```

## usage
```js
import '@feizheng/next-time-chunk';

const fetchApi = (item) => {
  return new Promise((resolve) => {
    setTimeout(() => {
      console.log('data:', item);
      resolve(item);
    }, 1000);
  });
};

nx.timeChunk(
  [1, 2, 3, 4, 5],
  {
    callback: (data) => {
      return fetchApi(data);
    },
    chunk: 2
  }
).then(res => {
  console.log(res);
});


// data: 1
// data: 2

// data: 3
// data: 4

// data: 5

// [ 1, 2, 3, 4, 5 ]
```

## resources
- https://www.cnblogs.com/ahthw/p/5117570.html

## Copyright and license

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

[npm-image]: https://img.shields.io/npm/v/rfs.svg
[npm-url]: https://npmjs.org/package/@feizheng/next-time-chunk
[licence-image]: https://img.shields.io/npm/l/@feizheng/next-time-chunk
[license-url]: https://github.com/afeiship/next-time-chunk/blob/master/LICENSE.txt
npm package: @feizheng/next-time-compare
Description: Time compare for next.
Author: afei
Latest version: 1.0.0

# next-time-compare
> Time compare 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 @feizheng/next-time-compare
```

## usage
```js
import '@feizheng/next-time-compare';

nx.timeCompare('09:41:13', '9:41:13');    // 0
nx.timeCompare('09:42:13', '9:41:13');    // 1
nx.timeCompare('09:40:13', '9:41:13');    // -1
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-time-compare
[download-url]: https://www.npmjs.com/package/@feizheng/next-time-compare
npm package: @feizheng/next-timeago
Description: A time ago implement.
Author: afei
Latest version: 1.0.1

# next-timeago
> A time ago implement.

## installation
```bash
npm install -S @feizheng/next-timeago
```

## rules
~~~
以下顺序选择显示规则：
1、60秒内：刚刚；
2、60分钟内：XX分钟前；
3、今天：X小时前
4、昨天：昨天 04:25
5、今年内：1-22 02:23
6、往年的：2010-1-22
~~~

## usage
```js
import '@feizheng/next-timeago';

const str = nx.timeago('2017-03-15 13:10:45');
console.log(str);
```
npm package: @feizheng/next-tlog
Description: Show log to document title.
Author: afei
Latest version: 1.0.0

# next-tlog
> Show log to document title.

[![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 @feizheng/next-tlog
```

## usage
```js
import '@feizheng/next-tlog';

nx.tlog('log1');
nx.tlog('log2', 'log3');
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-tlog
[download-url]: https://www.npmjs.com/package/@feizheng/next-tlog
npm package: @feizheng/next-tmpl
Description: A simple tmpl based on next.
Author: afei
Latest version: 1.0.4

# next-tmpl
> A simple tmpl based on next.

## installation
```bash
npm install -S @feizheng/next-tmpl
```

## usage
```js
import '@feizheng/next-tmpl';

nx.tmpl('I am {0}, I can live {1} year', ['afei', 100]);
nx.tmpl('I am {name}, I can live {age} year', { name:'afei', age:100});

// I am afei, I can live 100 year
```
npm package: @feizheng/next-to-action
Description: Make an action callback for target.
Author: afei
Latest version: 1.0.0

# next-to-action
> Make an action callback for target.

[![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 @feizheng/next-to-action
```

## usage
```js
import '@feizheng/next-to-action';

const trimer = nx.toAction('trim');
const list = [
  '  a',
  'b  ',
  ' c '
];

const res = list.map(trimer);

// ['a','b','c'];
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dw/@feizheng/next-to-action
[download-url]: https://www.npmjs.com/package/@feizheng/next-to-action
npm package: @feizheng/next-to-array
Description: To array for object or array like.
Author: afei
Latest version: 1.0.2

# next-to-array
> To array for object or array like.

## installation
```bash
npm install -S @feizheng/next-to-array
```

## usage
```js
import '@feizheng/next-to-array';

//DOCS here!
```
npm package: @feizheng/next-to-clipboard
Description: Copy text to clipboard.
Author: afei
Latest version: 1.0.3

# next-to-clipboard
> Copy text to clipboard.

[![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 @feizheng/next-to-clipboard
```

## usage
```js
import '@feizheng/next-to-clipboard';

document.getElementById('btn').onclick = function() {
  nx.toClipboard('TEXT_FEI' + Math.random());
};
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-to-clipboard
[download-url]: https://www.npmjs.com/package/@feizheng/next-to-clipboard
npm package: @feizheng/next-to-dingtalk-url
Description: Wrap url in dingtalk.
Author: afei
Latest version: 1.0.0

# next-to-dingtalk-url
> Wrap url in dingtalk.

[![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 @feizheng/next-to-dingtalk-url
```

## usage
```js
import '@feizheng/next-to-dingtalk-url';

const url = 'https://www.mipengine.org/';
const dingUrl = nx.toDingtalkUrl(url);

console.log(dingUrl);
// dingtalk://dingtalkclient/page/link?pc_slide=true&url=https%3A%2F%2Fwww.mipengine.org%2F
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-to-dingtalk-url
[download-url]: https://www.npmjs.com/package/@feizheng/next-to-dingtalk-url
npm package: @feizheng/next-to-thousands
Description: To  thousands for number.
Author: afei
Latest version: 1.0.1

# next-to-thousands
> To  thousands for number.

## installation
```bash
npm install -S @feizheng/next-to-thousands
```

## usage
```js
import '@feizheng/next-to-thousands';

nx.toThousands('10000')  //10,000
nx.toThousands('100')    //100
nx.toThousands(10000)    //10,000
nx.toThousands(1000,'|') //1|000
```
npm package: @feizheng/next-toggle
Description: Toggle array element.
Author: afei
Latest version: 1.0.1

# next-toggle
> Toggle array element.

[![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 @feizheng/next-toggle
```

## usage
```js
import '@feizheng/next-toggle';

const arr = [1,2,3,4];

nx.toggle(arr, 5);
// [1,2,3,4,5]
nx.toggle(arr, 5);
// [1,2,3,4]
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-toggle
[download-url]: https://www.npmjs.com/package/@feizheng/next-toggle
npm package: @feizheng/next-traverse
Description: Traverse object which has items key.
Author: afei
Latest version: 2.1.3

# next-traverse
> Traverse object which has items key.

[![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 @feizheng/next-traverse
```

## usage
```js
import '@feizheng/next-traverse';

const data = {
  tagName:'div',
  children:[
    {
      tagName:'p',
      content:'Content1'
    },
    {
      tagName:'p',
      content:'Content2'
    }
  ]
};

// walk your object/array:
nx.traverse(data,(index, value, children)=>{
  console.log(children);
}, { itemsKey: 'children'});
```

## options
| name     | type            | default | description                                           |
| -------- | --------------- | ------- | ----------------------------------------------------- |
| itemsKey | string/function | 'items' | The target children key.                              |
| context  | object          | null    | The loop context.                                     |
| inject   | boolean         | false   | If inject `independent` and `depth` to the tree item. |

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-traverse
[download-url]: https://www.npmjs.com/package/@feizheng/next-traverse
npm package: @feizheng/next-tree
Description: Tree data for next.
Author: afei
Latest version: 1.4.0

# next-tree
> Tree data 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 @feizheng/next-tree
```

## apis
| api         | params   | description                 |
| ----------- | -------- | --------------------------- |
| children    | callback | Find children only on level |
| parent      | callback | Find parent only one level  |
| descendants | callback | Find descendants recursion  |
| ancestors   | callback | Find ancestors recursion    |
| find        | callback | -                           |
| filter      | callback | -                           |
| search      | callback | -                           |
| table       | callback | Create table data           |


## usage
```js
import NxTree from '@feizheng/next-tree';

const treeData = {
  label: '空间',
  value: '/admin/space',
  children: [
    {
      label: '空间-子级1',
      value: '/admin/space/:id',
      children: [
        {
          label: '空间导出',
          value: '/admin/space/:id/export'
        }
      ]
    },
    {
      label: '空间-子级2',
      value: '/admin/space2/:id',
      children: [
        {
          label: '空间导出222',
          value: '/admin/space/:id/expor2222t'
        }
      ]
    }
  ]
};

const item = NxTree.create(treeData).find((_, item) => item.label === '空间导出222');
const data = NxTree.serialize(item);

// results:
{
  label: '空间导出222',
  value: '/admin/space/:id/expor2222t',
  depth: 2,
  independent: true
}
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-tree
[download-url]: https://www.npmjs.com/package/@feizheng/next-tree
npm package: @feizheng/next-tree-filter
Description: Tree filter for next.
Author: afei
Latest version: 1.0.1

# next-tree-filter
> Tree filter for next.

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

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

//DOCS here!
```
npm package: @feizheng/next-tree-search
Description: Tree search methods for next.
Author: afei
Latest version: 1.0.0

# next-tree-search
> Tree search methods 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 @feizheng/next-tree-search
```

## apis
| api    | params                    | description         |
| ------ | ------------------------- | ------------------- |
| find   | (data, callback, options) | Find one element.   |
| filter | (data, callback, options) | Find list elements. |

## usage
```js
import NxTreeSearch from '@feizheng/next-tree-search';

NxTreeSearch.find(data, (index, item)=>{});
NxTreeSearch.filter(data, (index, item)=>{});
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-tree-search
[download-url]: https://www.npmjs.com/package/@feizheng/next-tree-search
npm package: @feizheng/next-tree-walk
Description: Tree data walker.
Author: afei
Latest version: 1.0.8

# next-tree-walk
> Tree data walker.

[![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 @feizheng/next-tree-walk
```

## usage
```js
import '@feizheng/next-tree-walk';

class MyComponent extends React.Component{
  get childView(){
    const { items, itemsKey, template } = this.props;
    return nx.treeWalk(items, { template, 'children' });
  }

  render(){
    return (
      <div>
        {this.childView}
      </div>
    )
  }
}
```

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

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

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

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

[download-image]: https://img.shields.io/npm/dm/@feizheng/next-tree-walk
[download-url]: https://www.npmjs.com/package/@feizheng/next-tree-walk
npm package: @feizheng/next-trigger-resize
Description: Manual trigger native resize event.
Author: afei
Latest version: 1.0.1

# next-trigger-resize
> Manual trigger native resize event.

## installation
```bash
npm install -S @feizheng/next-trigger-resize
```

## usage
```js
import '@feizheng/next-trigger-resize';

//DOCS here!
```

## resources
- https://stackoverflow.com/questions/39237485/how-to-trigger-window-resize-event-using-vanilla-javascript/39237538
npm package: @feizheng/next-trim
Description: Trim space or customize string.
Author: afei
Latest version: 1.0.3

# next-trim
> Trim space or customize string.

## installation
```bash
npm install -S @feizheng/next-trim
```

## usage
```js
import '@feizheng/next-trim';

//1. trim space:
nx.trim('  abc');
nx.trim('  abc  ');
nx.trim('abc  ');

// abc

// 2.trim char
nx.trim('/sso-login.html','/');
nx.trim('//sso-login.html','/');

// sso-login.html
```
npm package: @feizheng/next-trim-repeated
Description: Trim repeat for next.
Author: afei
Latest version: 1.0.0

# next-trim-repeated
> Trim repeat for next.

## installation
```bash
npm install -S @feizheng/next-trim-repeated
```

## usage
```js
import '@feizheng/next-trim-repeated';

nx.trimRepeated('foo--bar---baz', '-');
//=> 'foo-bar-baz'

nx.trimRepeated('foo@#@#baz', '@#');
//=> 'foo@#baz'
```

## resources
- https://github.com/sindresorhus/trim-repeated
npm package: @feizheng/next-tx-abstract-cos
Description: Basic cos class for next.
Author: afei
Latest version: 1.0.0

# next-tx-abstract-cos
> Basic cos class for next.

## installation
```bash
npm install -S @feizheng/next-tx-abstract-cos
```

## apis
| api          | params | description       |
| ------------ | ------ | ----------------- |
| parseOptions | -      | Normalize bucket. |

## usage
```js
import NxTxAbstractCos from '@feizheng/next-tx-abstract-cos';

// code goes here:
```
npm package: @feizheng/next-tx-cos-bucket
Description: Tencent cos bucket for next.
Author: afei
Latest version: 1.0.1

# next-tx-cos-bucket
> Tencent cos bucket for next.

## installation
```bash
npm install -S @feizheng/next-tx-cos-bucket
```

## apis
| api     | params | description                  |
| ------- | ------ | ---------------------------- |
| get     | -      | Cos getBucket                |
| put     | -      | Cos putBucket                |
| del     | -      | Cos deleteBucket             |
| head    | -      | Cos headBucket               |
| gets    | -      | List cos buckets             |
| has     | -      | Extend method has bucket     |
| create  | -      | Extend method create bucket  |
| destroy | -      | Extend method destroy bucket |

## usage
```js
import NxTxCosBucket from '@feizheng/next-tx-cos-bucket';

// code goes here:
```

## resources
- https://stackoverflow.com/questions/24586110/resolve-promises-one-after-another-i-e-in-sequence
- http://bluebirdjs.com/docs/api-reference.html
- https://cloud.tencent.com/document/product/436/36118
npm package: @feizheng/next-tx-cos-sdk
Description: Tencent cos-nodejs-sdk wrapper.
Author: afei
Latest version: 1.2.0

# next-tx-cos-sdk
> Tencent cos-nodejs-sdk wrapper.

## installation
```bash
npm install -S @feizheng/next-tx-cos-sdk
```

## apis
| api | params | description   |
| --- | ------ | ------------- |
| get | -      | desc balabala |
| put | -      | desc balabala |
| del | -      | desc balabala |

## usage
```js
import NxTxCosSdk from '@feizheng/next-tx-cos-sdk';

const config = {
  id: 'xxx',
  SecretId: 'xxxx',
  SecretKey: 'xxxxx'
};

// https://console.cloud.tencent.com/cos5/bucket
const nxCos = new NxTxCosSdk(config);

// create
nxCos
  .get({
    Bucket: 'img3-1301823685',
    Region: 'ap-chengdu'
  })
  .then((res) => {
    console.log(res);
  });

// // get
// nxCos.get().then((res) => {
//   console.log(res);
// });

// //delete
// nxCos
//   .del({
//     Bucket: 'img1-xxx',
//     Region: 'ap-chengdu'
//   })
//   .catch((err) => {
//     console.log(err);
//   });
```

## resources
- https://github.com/sindresorhus/pify
- https://cloud.tencent.com/document/product/436/8629
- https://cloud.tencent.com/document/product/436/36119
npm package: @feizheng/next-underscored
Description: Converts a camelized or dasherized string into an underscored one.
Author: afei
Latest version: 1.0.1

# next-underscored
> Converts a camelized or dasherized string into an underscored one.

## installation
```bash
npm install -S @feizheng/next-underscored
```

## usage
```js
import 'next-underscored';

//DOCS here!
```