We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 732db32 commit 6da2c15Copy full SHA for 6da2c15
src/object.js
@@ -1,7 +1,2 @@
1
-export default function object(mapping) {
2
- const object_ = {};
3
-
4
- for (const [key, value] of mapping) object_[key] = value;
5
6
- return object_;
7
-}
+const object = (mapping) => Object.fromEntries(mapping);
+export default object;
0 commit comments