Add note about _.runInContext to _.mixin docs. [ci skip]

This commit is contained in:
jdalton
2015-03-23 20:04:13 -07:00
parent d560e2a558
commit 763b003a11

View File

@@ -11065,6 +11065,9 @@
* destination object. If `object` is a function then methods are added to
* its prototype as well.
*
* **Note:** Use `_.runInContext` to create a pristine `lodash` function
* for mixins to avoid conflicts caused by modifying the original.
*
* @static
* @memberOf _
* @category Utility
@@ -11082,7 +11085,7 @@
* });
* }
*
* // use `_.runInContext` to avoid potential conflicts (esp. in Node.js)
* // use `_.runInContext` to avoid conflicts (esp. in Node.js)
* var _ = require('lodash').runInContext();
*
* _.mixin({ 'vowels': vowels });