Socket
Book a DemoInstallSign in
Socket

lodash-migrate

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash-migrate

Migrate to the latest Lodash release.

latest
Source
npmnpm
Version
0.3.16
Version published
Weekly downloads
274
51.38%
Maintainers
2
Weekly downloads
 
Created
Source

lodash-migrate v0.3.16

Migrate older Lodash code to the latest release.

Installation

Using npm:

$ npm i -g npm
$ npm i lodash-migrate

In a browser:

<!-- Replace lodash.js with lodash-migrate.js. -->
<script src="path/to/dist/lodash-migrate.js"></script>
<!-- Customize logging. -->
<script>
migrate({
  'log': logger,
  'migrateMessage': migrateTemplate,
  'renameMessage': renameTemplate
});
</script>

In Node.js:

// Load the older Lodash.
var _ = require('lodash');
// Load lodash-migrate.
require('lodash-migrate');
// Load and customize logging.
require('lodash-migrate')({
  'log': logger,
  'migrateMessage': migrateTemplate,
  'renameMessage': renameTemplate
});

// Later when using API not supported by the latest release.
_.max(['13', '22'], '1');
// => logs:
// lodash-migrate: _.max([ '13', '22' ], '1')
//   v3.10.1 => '13'
//   v4.17.4 => '22'

Keywords

compatibility

FAQs

Package last updated on 31 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts