lodash-alias-names
v1.0.0
Published
Alias names of the Lodash methods
Downloads
8
Maintainers
Readme
lodash-alias-names
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
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`.