1.0.2 • Published 4 years ago

util-lib-apply v1.0.2

Weekly downloads
15
License
ISC
Repository
-
Last release
4 years ago

util-lib-apply

Apply method of encapsulation integration

Usage

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

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

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

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago