Version 1
[yaffs-website] / node_modules / uncss / node_modules / lodash / toPairs.js
diff --git a/node_modules/uncss/node_modules/lodash/toPairs.js b/node_modules/uncss/node_modules/lodash/toPairs.js
new file mode 100644 (file)
index 0000000..6ca4a0e
--- /dev/null
@@ -0,0 +1,28 @@
+var baseToPairs = require('./internal/baseToPairs'),
+    keys = require('./keys');
+
+/**
+ * Creates an array of own enumerable key-value pairs for `object`.
+ *
+ * @static
+ * @memberOf _
+ * @category Object
+ * @param {Object} object The object to query.
+ * @returns {Array} Returns the new array of key-value pairs.
+ * @example
+ *
+ * function Foo() {
+ *   this.a = 1;
+ *   this.b = 2;
+ * }
+ *
+ * Foo.prototype.c = 3;
+ *
+ * _.toPairs(new Foo);
+ * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
+ */
+function toPairs(object) {
+  return baseToPairs(object, keys(object));
+}
+
+module.exports = toPairs;