@jswork/next-invoke

1.0.1 • Public • Published

next-invoke

Invoke a method with context.

version license size download

installation

yarn add @jswork/next-invoke

usage

import '@jswork/next-invoke';

const obj1 = {
  name: 'obj1',
  fn1: function(arg1, arg2) {
    console.log('args:', arg1, arg2);
    return this.name + '_FEI';
  }
};

const rs = nx.invoke(obj1, 'fn1', ['arg1', 'arg2']);

// obj1_FEI
// args: arg1 arg2

license

Code released under the MIT license.

Dependencies (0)

    Dev Dependencies (15)

    Package Sidebar

    Install

    npm i @jswork/next-invoke

    Homepage

    js.work

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.26 kB

    Total Files

    6

    Last publish

    Collaborators

    • afeiship