api update
This commit is contained in:
1 parent
502a314c68
commit
99b412ea8d
19 files changed
+684
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
*
|
||||
* f([x, y, z, ...]) -> f(v) -> {v.x, v.y, v.z}
|
||||
*
|
||||
* @param fields
|
||||
* @returns {function(*): *}
|
||||
*/
|
||||
export function select(fields=[]){
|
||||
return i => fields.reduce((out, key) => {
|
||||
out[key] = i[key];
|
||||
return out;
|
||||
}, {});
|
||||
}
|
||||
Reference in new issue
Block a user