1.0.0 • Published 4 years ago

@feizheng/next-compose v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

next-compose

Compose for next.

version license size download

installation

npm install -S @feizheng/next-compose

usage

import '@feizheng/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');
// @{AFEI}

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

license

Code released under the MIT license.