just-demethodize
TypeScript icon, indicating that this package has built-in type declarations

3.2.0 • Public • Published

just-demethodize

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-demethodize
yarn add just-demethodize

Turn a method into a standalone function; the first arg becomes this

import demethodize from 'just-demethodize';

const trimFn = demethodize(''.trim);
['hello ', ' goodbye', 'hello again'].map(trimFn); // ['hello', 'goodbye', 'hello again']

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i just-demethodize

      Weekly Downloads

      10

      Version

      3.2.0

      License

      MIT

      Unpacked Size

      5.77 kB

      Total Files

      9

      Last publish

      Collaborators

      • angus-c