Nourishing Pizza Microservice

    @jswork/next-compose

    1.1.2 • 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.

    Install

    npm i @jswork/next-compose

    DownloadsWeekly Downloads

    59

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    4.8 kB

    Total Files

    5

    Last publish

    Collaborators

    • afeiship