Upgrade to babel 6
This commit is contained in:
parent
3507412814
commit
a0a4e04f30
@ -5,9 +5,9 @@ function is(path, predicate, object) {
|
||||
const parts = splitPath(path);
|
||||
|
||||
let rest = object;
|
||||
let part;
|
||||
for (part of parts) {
|
||||
for (let i = 0; i < parts.length; ++i) {
|
||||
if (typeof rest === 'undefined') return false;
|
||||
const part = parts[i];
|
||||
rest = rest[part];
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,8 @@ function countArguments(args, max) {
|
||||
}
|
||||
|
||||
export function curry1(fn) {
|
||||
return function curried(a, ...[b, c]) {
|
||||
return function curried(a, ...args) {
|
||||
const [b, c] = args;
|
||||
const n = countArguments(arguments);
|
||||
|
||||
if (n >= 1) return fn(a, b, c);
|
||||
@ -22,7 +23,8 @@ export function curry1(fn) {
|
||||
}
|
||||
|
||||
export function curry2(fn) {
|
||||
return function curried(a, b, ...[c, d]) {
|
||||
return function curried(a, b, ...args) {
|
||||
const [c, d] = args;
|
||||
const n = countArguments(arguments, 2);
|
||||
|
||||
if (b === _ || c === _ || d === _) {
|
||||
@ -40,7 +42,8 @@ export function curry2(fn) {
|
||||
}
|
||||
|
||||
export function curry3(fn) {
|
||||
return function curried(a, b, c, ...[d, e]) {
|
||||
return function curried(a, b, c, ...args) {
|
||||
const [d, e] = args;
|
||||
const n = countArguments(arguments, 3);
|
||||
|
||||
if (c === _ || d === _ || e === _) {
|
||||
@ -68,7 +71,8 @@ export function curry3(fn) {
|
||||
}
|
||||
|
||||
export function curry4(fn) {
|
||||
return function curried(a, b, c, d, ...[e, f]) {
|
||||
return function curried(a, b, c, d, ...args) {
|
||||
const [e, f] = args;
|
||||
const n = countArguments(arguments, 4);
|
||||
|
||||
if (d === _ || e === _ || f === _) {
|
||||
|
12
package.json
12
package.json
@ -32,22 +32,22 @@
|
||||
"lodash": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel": "^5.8.21",
|
||||
"babel-core": "^5.5.0",
|
||||
"babel-eslint": "^4.0.5",
|
||||
"babel-loader": "^5.3.2",
|
||||
"babel-core": "^6.4.0",
|
||||
"babel-loader": "^6.2.1",
|
||||
"babel-preset-es2015": "^6.3.13",
|
||||
"babel-preset-stage-2": "^6.3.13",
|
||||
"benchmark": "^1.0.0",
|
||||
"chai": "^3.2.0",
|
||||
"eslint": "^0.24.1",
|
||||
"eslint-config-airbnb": "0.0.7",
|
||||
"exports-loader": "^0.6.2",
|
||||
"gulp": "^3.6.0",
|
||||
"gulp-babel": "^5.1.0",
|
||||
"gulp-babel": "^6.1.1",
|
||||
"gulp-eslint": "^0.15.0",
|
||||
"gulp-mocha": "^2.0.0",
|
||||
"gulp-nsp": "^2.0.0",
|
||||
"karma": "^0.13.3",
|
||||
"karma-babel-preprocessor": "^5.2.1",
|
||||
"karma-babel-preprocessor": "^6.0.1",
|
||||
"karma-chrome-launcher": "^0.2.0",
|
||||
"karma-mocha": "^0.2.0",
|
||||
"karma-mocha-reporter": "^1.0.4",
|
||||
|
Loading…
Reference in New Issue
Block a user