Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including simple-methodize-x with all npm packages installed. Try it out:

var simpleMethodizeX = require("simple-methodize-x")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

simple-methodize-x v1.0.4

Methodize a prototype method. Compliant to 8 arguments.

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

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]
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free