UNPKG
@stangres/react-leaflet
Version:
latest (2.8.0)
2.8.0
2.7.0
2.5.0
2.4.0
React components for Leaflet maps
github.com/PaulLeCam/react-leaflet
stangres/react-leaflet
@stangres/react-leaflet
/
es
/
utils
/
pick.js
11 lines
(9 loc)
•
190 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
"use strict"
;
export
default
function
pick
(
object
, keys
) {
return
keys.
reduce
(
function
(
obj, key
) {
if
(
object
[key]) { obj[key] =
object
[key]; }
return
obj; }, {}); }