1.1.1 • Published 10 years ago

@f/apply v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 years ago

apply

Build status Git tag NPM version Code style

Faster apply than the native Function.prototype.apply

Installation

$ npm install @f/apply

Usage

var apply = require('@f/apply')

apply(add, [1, 2]) // => 3

function add (one, two) {
  return one + two
}

API

apply(fn, args)

  • fn - The function to invoke
  • args - The argument list as an array

Returns: return of invoked fn

Performance

Here's the jsperf. In Chrome, it's roughly 2.5x faster than the native apply.

License

MIT

1.1.1

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago