Skip to content

Commit 21e53cf

Browse files
committed
Clarify behavior of non-existent keys.
1 parent c145580 commit 21e53cf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

doc/API.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,8 @@ Oolong.ownKeys(person) // => ["age"]
427427

428428
<a name="Oolong.pick" />
429429
### Oolong.pick(object, keys...)
430-
Filters the keys of an object to only those given as `keys...`.
430+
Filters the keys of an object to only those given as `keys...`.
431+
Only keys that exist in `object` are included.
431432

432433
**Examples**:
433434
```javascript

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,8 @@ exports.object = function(keys, fn, thisArg) {
622622
exports.ownKeys = Object.keys
623623

624624
/**
625-
* Filters the keys of an object to only those given as `keys...`.
625+
* Filters the keys of an object to only those given as `keys...`.
626+
* Only keys that exist in `object` are included.
626627
*
627628
* @example
628629
* var person = {name: "Alice", email: "alice@example.com", age: 42}

0 commit comments

Comments
 (0)