1 /** Used for native method references. */
2 var objectProto = Object.prototype;
4 /** Used to detect DOM support. */
5 var document = (document = global.window) && document.document;
7 /** Native method references. */
8 var propertyIsEnumerable = objectProto.propertyIsEnumerable;
11 * An object environment feature flags.
20 var Ctor = function() { this.x = x; },
21 object = { '0': x, 'length': x },
24 Ctor.prototype = { 'valueOf': x, 'y': x };
25 for (var key in new Ctor) { props.push(key); }
28 * Detect if functions can be decompiled by `Function#toString`
29 * (all but Firefox OS certified apps, older Opera mobile browsers, and
30 * the PlayStation 3; forced `false` for Windows 8 apps).
35 support.funcDecomp = /\bthis\b/.test(function() { return this; });
38 * Detect if `Function#name` is supported (all but IE).
43 support.funcNames = typeof Function.name == 'string';
46 * Detect if the DOM is supported.
52 support.dom = document.createDocumentFragment().nodeType === 11;
58 * Detect if `arguments` object indexes are non-enumerable.
60 * In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object
61 * indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat
62 * `arguments` object indexes as non-enumerable and fail `hasOwnProperty`
63 * checks for indexes that exceed the number of function parameters and
64 * whose associated argument values are `0`.
70 support.nonEnumArgs = !propertyIsEnumerable.call(arguments, 1);
72 support.nonEnumArgs = true;
76 module.exports = support;