mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Bump to v3.0.0.
This commit is contained in:
61
lodash.support/index.js
Normal file
61
lodash.support/index.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* lodash 3.0.0 (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modern modularize exports="npm" -o ./`
|
||||
* Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
||||
* Based on Underscore.js 1.7.0 <http://underscorejs.org/LICENSE>
|
||||
* Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
* Available under MIT license <https://lodash.com/license>
|
||||
*/
|
||||
|
||||
/** Used for native method references. */
|
||||
var objectProto = Object.prototype;
|
||||
|
||||
/** Used to detect DOM support. */
|
||||
var document = (document = global.window) && document.document;
|
||||
|
||||
/** Native method references. */
|
||||
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||
|
||||
/**
|
||||
* An object environment feature flags.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Object
|
||||
*/
|
||||
var support = {};
|
||||
|
||||
(function(x) {
|
||||
|
||||
/**
|
||||
* Detect if the DOM is supported.
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type boolean
|
||||
*/
|
||||
try {
|
||||
support.dom = document.createDocumentFragment().nodeType === 11;
|
||||
} catch(e) {
|
||||
support.dom = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detect if `arguments` object indexes are non-enumerable.
|
||||
*
|
||||
* In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object
|
||||
* indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat
|
||||
* `arguments` object indexes as non-enumerable and fail `hasOwnProperty`
|
||||
* checks for indexes that exceed their function's formal parameters with
|
||||
* associated values of `0`.
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type boolean
|
||||
*/
|
||||
try {
|
||||
support.nonEnumArgs = !propertyIsEnumerable.call(arguments, 1);
|
||||
} catch(e) {
|
||||
support.nonEnumArgs = true;
|
||||
}
|
||||
}(0, 0));
|
||||
|
||||
module.exports = support;
|
||||
Reference in New Issue
Block a user