Have ideas to improve npm?Join in the discussion! »

    util-lib-bind

    1.0.3 • Public • Published

    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));

    Install

    npm i util-lib-bind

    DownloadsWeekly Downloads

    6

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    3.37 kB

    Total Files

    7

    Last publish

    Collaborators

    • avatar