Skip to content

Commit f8efeec

Browse files
committed
adding underscore
1 parent e8dffdd commit f8efeec

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

.eslintrc.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44
"eslint:recommended",
55
"plugin:react/recommended"
66
],
7-
"rules": {
8-
"react/display-name": 0,
9-
"react/prop-types": 0
10-
},
7+
"rules": {},
118
"env": {
12-
"browser": true
9+
"browser": true,
10+
"amd": true
1311
},
14-
"settings": {
15-
"react": {
16-
"version": "16.0"
17-
}
18-
}
12+
"settings": {}
1913
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@
1818
"husky": "^4.3.0",
1919
"lint-staged": "^10.4.0",
2020
"prettier": "^2.1.2"
21+
},
22+
"dependencies": {
23+
"underscore": "^1.11.0"
2124
}
2225
}

unsplat.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const _ = require('underscore')
2+
3+
function unsplat(fun) {
4+
return function () {
5+
return fun.call(null, _.toArray(arguments))
6+
}
7+
}
8+
var joinElements = unsplat(function (array) {
9+
return array.join(' ')
10+
})
11+
12+
joinElements(1, 2) //=> "1 2"
13+
14+
joinElements('-', '$', '/', '!', ':') //=> "- $ / ! :"

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,6 +1588,11 @@ type-fest@^0.8.1:
15881588
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
15891589
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
15901590

1591+
underscore@^1.11.0:
1592+
version "1.11.0"
1593+
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.11.0.tgz#dd7c23a195db34267186044649870ff1bab5929e"
1594+
integrity sha512-xY96SsN3NA461qIRKZ/+qox37YXPtSBswMGfiNptr+wrt6ds4HaMw23TP612fEyGekRE6LNRiLYr/aqbHXNedw==
1595+
15911596
uri-js@^4.2.2:
15921597
version "4.4.0"
15931598
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.0.tgz#aa714261de793e8a82347a7bcc9ce74e86f28602"

0 commit comments

Comments
 (0)