summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md')
-rw-r--r--deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md17
1 files changed, 13 insertions, 4 deletions
diff --git a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
index b502b2d3a4..7303642e01 100644
--- a/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
+++ b/deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/README.md
@@ -19,14 +19,23 @@ Returns whether two objects are equal.
Returns true if the given object has no properties and false otherwise. This
is O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)).
+### hasKey(obj, key)
+
+Returns true if the given object has an enumerable, non-inherited property
+called `key`. [For information on enumerability and ownership of properties, see
+the MDN
+documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties)
### forEachKey(obj, callback)
-Like Array.forEach, but iterates properties of an object rather than elements
-of an array. Equivalent to:
+Like Array.forEach, but iterates enumerable, owned properties of an object
+rather than elements of an array. Equivalent to:
- for (var key in obj)
- callback(key, obj[key]);
+ for (var key in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, key)) {
+ callback(key, obj[key]);
+ }
+ }
### flattenObject(obj, depth)