UNPKG
imma
Version:
latest (0.0.1)
0.0.1
A collection of functions for dealing with native arrays and objects immutably
imma
/
lib
/
object
/
pick.js
7 lines
(6 loc)
•
157 B
JavaScript
View Raw
1
2
3
4
5
6
7
'use strict'
const
pick =
module
.
exports
=
(
object
, keys
) =>
{
const
result = {}
for
(
let
key
of
keys) result[key] =
object
[key]
return
result }