1.0.4 • Published 5 years ago

simple-methodize-x v1.0.4

Weekly downloads
3,122
License
MIT
Repository
github
Last release
5 years ago

simple-methodize-x

Methodize a prototype method. Compliant to 8 arguments.

module.exports*

Methodize a prototype method. Compliant to 8 arguments.

Kind: Exported member
Returns: Function - The static method. Throws:

  • TypeError If prototypeMethod is not a function.
ParamTypeDescription
prototypeMethodFunctionThe prototype method.

Example

import methodize from 'simple-methodize-x';

const push = methodize([].push);
const array = [];
push(array, 1);
push(array, 2);
console.log(array); // [1, 2]