UNPKG
nusp-arco-design
Version:
latest (2.66.0-beta.2)
2.66.0-beta.2
Arco Design React UI Library.
arco.design
zhanghui-space/arco-design
nusp-arco-design
/
es
/
_util
/
include.js
11 lines
(10 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
// return an object with specify keys
export
default
function
include
(
obj, keys
) {
var
clone = {};
Object
.
keys
(obj).
forEach
(
function
(
key
) {
if
(keys.
indexOf
(key) !== -
1
) { clone[key] = obj[key]; } });
return
clone; }