lodash-alias-names

1.0.0 • Public • Published

lodash-alias-names

NPM version Build Status devDependencies Status

Alias names of the Lodash methods

{
  "head": [
    "first"
  ],
  "forEach": [
    "each"
  ],
  "forEachRight": [
    "eachRight"
  ],
  "assignIn": [
    "extend"
  ],
  "assignInWith": [
    "extendWith"
  ],
  "toPairs": [
    "entries"
  ],
  "toPairsIn": [
    "entriesIn"
  ],
  "prototype.value": [
    "prototype.toJSON",
    "prototype.valueOf"
  ]
}

Installation

Use npm.

npm install lodash-alias-names

Usage

const lodashAliasNames = require('lodash-alias-names');

lodashAliasNames

Type: Object

Lodash has some alias methods for backward compatibility. For exmaple _.extend was renamed to _.assignIn in v4.0.0 and at the same time re-added as an alias of _.assignIn.

The exposed object is in the following form:

{
  "originalLodashMethodName": [
    "aliasLodashMethodName",
    // ...
  ],
  // ...
}
lodashAliasNames.forEach; //=> ['each']
// This means "`_.forEach` has one alias: `_.each`.
 
lodashAliasNames['prototype.value']; //=> ['prototype.toJSON', 'prototype.valueOf']
// This means `_.prototype.value` has two aliases: `_.prototype.toJSON` and `_.prototype.valueOf`.

License

The Unlicense.

Package Sidebar

Install

npm i lodash-alias-names

Weekly Downloads

1

Version

1.0.0

License

Unlicense

Last publish

Collaborators

  • shinnn