Skip to main content

Function.prototype.demethodize

Less than 1 minutefeaturees-proposal

Function.prototype.demethodizeopen in new window

Module

esnext.function.demethodizeopen in new window

Types

interface Function {
  demethodize(): Function;
}

Entry points

core-js/proposals/function-demethodize
core-js(-pure)/full/function/demethodize
core-js(-pure)/full/function/virtual/demethodize

Example

Exampleopen in new window:

const slice = Array.prototype.slice.demethodize();

slice([1, 2, 3], 1); // => [2, 3]