跳至主要內容

Function.prototype.demethodize

小于 1 分钟featurees-proposal

Function.prototype.demethodizeopen in new window

模块

esnext.function.demethodizeopen in new window

类型

interface Function {
  demethodize(): Function;
}

入口点

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

示例

示例open in new window:

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

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