UNPKG

461 BJavaScriptView Raw
1import each from './each';
2import isPlainObject from './is-plain-object';
3var hasOwnProperty = Object.prototype.hasOwnProperty;
4export default (function (object, keys) {
5 if (object === null || !isPlainObject(object)) {
6 return {};
7 }
8 var result = {};
9 each(keys, function (key) {
10 if (hasOwnProperty.call(object, key)) {
11 result[key] = object[key];
12 }
13 });
14 return result;
15});
16//# sourceMappingURL=pick.js.map
\No newline at end of file