We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90ce474 commit dd835b4Copy full SHA for dd835b4
1 file changed
index.js
@@ -13,10 +13,8 @@ const DEFAULTS = {
13
const compose = (...fns) => (res, ...args) =>
14
fns.reduceRight((accum, next) => next(accum, ...args), res)
15
16
-const createRootObj = compose(
17
- n => (isNaN(n) ? Object.create(null) : new Array(n)),
18
- Number
19
-)
+const createRootObj = n =>
+ isNaN(n) ? Object.create(null) : new Array(Number(n))
20
21
const normalizeField = delimiter => m => {
22
if (m.indexOf(delimiter) > -1) {
0 commit comments