mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 19:37:49 +00:00
Add note about _.runInContext to _.mixin docs. [ci skip]
This commit is contained in:
@@ -11065,6 +11065,9 @@
|
|||||||
* destination object. If `object` is a function then methods are added to
|
* destination object. If `object` is a function then methods are added to
|
||||||
* its prototype as well.
|
* its prototype as well.
|
||||||
*
|
*
|
||||||
|
* **Note:** Use `_.runInContext` to create a pristine `lodash` function
|
||||||
|
* for mixins to avoid conflicts caused by modifying the original.
|
||||||
|
*
|
||||||
* @static
|
* @static
|
||||||
* @memberOf _
|
* @memberOf _
|
||||||
* @category Utility
|
* @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();
|
* var _ = require('lodash').runInContext();
|
||||||
*
|
*
|
||||||
* _.mixin({ 'vowels': vowels });
|
* _.mixin({ 'vowels': vowels });
|
||||||
|
|||||||
Reference in New Issue
Block a user