1.0.3 • Published 4 years ago

util-lib-bind v1.0.3

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

util-lib-bind

Bind method of encapsulation integration

Usage

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

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

      let obj = {
        c: 521,
      };
      window.c = 1314;
      
      let fn = utils.bind(add, obj, 10)

      console.log(fn(10));
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago