util-lib-call

1.0.3 • Public • Published

util-lib-call

Call method of encapsulation integration

Usage

    const utils = require('util-lib-call');

    function add (a, b) {
        console.log('this', this);
        return a + b + this.c;
      }

      let obj = {
        c: 521,
      };
      window.c = 1314;
      
      console.log(utils.call(add, obj, 10, 20));
      console.log(utils.call(add, null, 10, 20));

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    1
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i util-lib-call

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

3.08 kB

Total Files

7

Last publish

Collaborators

  • qiao195423