@jswork/next-compose

1.1.3 • Public • Published

next-compose

Compose for next.

version license size download

installation

npm install -S @jswork/next-compose

usage

import '@jswork/next-compose';

const fn1 = function (inStr) {
  return inStr.toUpperCase();
};

const fn2 = function (inStr) {
  return ['{', inStr, '}'].join('');
};

const fn3 = function (inStr){
  return '@' + inStr;
}

const cp = nx.compose(fn1, fn2, fn3);
const cp2 = nx.compose(fn3, fn2, fn1);

const rs = cp('afei');  // fn1(fn2(fn3('afei')));
// {@AFEI}

const rs2 = cp2('afei'); // fn3(fn2(fn1('afei')));
// @{AFEI}

license

Code released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @jswork/next-compose

Homepage

js.work

Weekly Downloads

47

Version

1.1.3

License

MIT

Unpacked Size

5.22 kB

Total Files

6

Last publish

Collaborators

  • afeiship