Version 1
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / _indexKeys.js
diff --git a/node_modules/grunt-legacy-util/node_modules/lodash/_indexKeys.js b/node_modules/grunt-legacy-util/node_modules/lodash/_indexKeys.js
new file mode 100644 (file)
index 0000000..0e2fc10
--- /dev/null
@@ -0,0 +1,24 @@
+var baseTimes = require('./_baseTimes'),
+    isArguments = require('./isArguments'),
+    isArray = require('./isArray'),
+    isLength = require('./isLength'),
+    isString = require('./isString');
+
+/**
+ * Creates an array of index keys for `object` values of arrays,
+ * `arguments` objects, and strings, otherwise `null` is returned.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @returns {Array|null} Returns index keys, else `null`.
+ */
+function indexKeys(object) {
+  var length = object ? object.length : undefined;
+  if (isLength(length) &&
+      (isArray(object) || isString(object) || isArguments(object))) {
+    return baseTimes(length, String);
+  }
+  return null;
+}
+
+module.exports = indexKeys;