Giter Club home page Giter Club logo

my-underscore's Introduction

函数路线

call and apply

    // 不这样做的原因是 call 比 apply 快很多
    // .apply 在运行前要对作为参数的数组进行一系列检验和深拷贝,.call 则没有这些步骤
    // 例如参数数组为非对象会报错,
    // 又例如如何参数数组为undefined或null则在内部调用call方法,使得所有参数都为undefined。所以要注意当用null时,参数是undefined,不是null
    
    // 具体可以参考:
            // https://segmentfault.com/q/1010000007894513
            // http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.4.3
            // http://www.ecma-international.org/ecma-262/5.1/#sec-15.3.4.4

偏函数

_.partial

my-underscore's People

Contributors

luobogor avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.