- Lodash Tutorial
- Lodash - Home
- Lodash - Overview
- Lodash - Environment Setup
- Lodash - Array
- Lodash - Collection
- Lodash - Date
- Lodash - Function
- Lodash - Lang
- Lodash - Math
- Lodash - Number
- Lodash - Object
- Lodash - Seq
- Lodash - String
- Lodash - Util
- Lodash - Properties
- Lodash - Methods
- Lodash Useful Resources
- Lodash - Quick Guide
- Lodash - Useful Resources
- Lodash - Discussion
Lodash - noConflict method
Syntax
_.noConflict()
Reverts the _ variable to its previous value and returns a reference to the lodash function.
Output
(Function) − Returns the lodash function.
Example
var _ = require('lodash'); var lodash = _.noConflict(); function vowels(string) { return lodash.filter(string, function(v) { return /[aeiou]/i.test(v); }); } console.log(vowels('Julie'));
Save the above program in tester.js. Run the following command to execute this program.
Command
\>node tester.js
Output
[ 'u', 'i', 'e' ]
lodash_util.htm
Advertisements