-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add isGenerator and isGeneratorFunction. Bump dependencies.
- Loading branch information
1 parent
d01059a
commit f538ce1
Showing
183 changed files
with
637 additions
and
628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
Error.stackTraceLimit=Infinity; | ||
|
||
var _ = require('lodash'); //eslint-disable-line no-var | ||
var lodash = _.runInContext(); //eslint-disable-line no-var | ||
module.exports = lodash.mixin(require('./dist')); | ||
var _ = require('lodash') //eslint-disable-line no-var | ||
var lodash = _.runInContext() //eslint-disable-line no-var | ||
module.exports = lodash.mixin(require('./dist')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import _ from 'lodash'; | ||
import _ from 'lodash' | ||
|
||
export default function apply(method, args) { | ||
return _.isFunction(method) ? method.apply(null, args) : null; | ||
return _.isFunction(method) ? method.apply(null, args) : null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import { _hint } from './util'; | ||
export default _hint('assign', true); | ||
import { _hint } from './util' | ||
export default _hint('assign', true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { baseGet as default } from './core'; | ||
export { baseGet as default } from './core' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { baseHas as default } from './core'; | ||
export { baseHas as default } from './core' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { baseSet as default } from './core'; | ||
export { baseSet as default } from './core' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { _hint } from './util'; | ||
import compose from './compose'; | ||
import iterable from './iterable'; | ||
import { _hint } from './util' | ||
import compose from './compose' | ||
import iterable from './iterable' | ||
|
||
export default compose(_hint('butLast'), iterable); | ||
export default compose(_hint('butLast'), iterable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import apply from './apply'; | ||
import apply from './apply' | ||
|
||
export default function call(method, ...args) { | ||
return apply(method, args); | ||
return apply(method, args) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { _hint } from './util'; | ||
import { _hint } from './util' | ||
|
||
export default _hint('chunk'); | ||
export default _hint('chunk') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { _hint } from './util'; | ||
import { _hint } from './util' | ||
|
||
export default _hint('clone'); | ||
export default _hint('clone') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import _ from 'lodash'; | ||
import { deepClone } from './customizers'; | ||
import _ from 'lodash' | ||
import { deepClone } from './customizers' | ||
|
||
export default function cloneDeep(data) { | ||
return _.cloneDeepWith(data, deepClone); | ||
return _.cloneDeepWith(data, deepClone) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import _ from 'lodash'; | ||
import { deepClone } from './composers'; | ||
import _ from 'lodash' | ||
import { deepClone } from './composers' | ||
|
||
export default function cloneDeepWith(data, customizer) { | ||
return _.cloneDeepWith(data, deepClone(customizer)); | ||
return _.cloneDeepWith(data, deepClone(customizer)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { _hint } from './util'; | ||
import { _hint } from './util' | ||
|
||
export default _hint('cloneWith'); | ||
export default _hint('cloneWith') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { _hint } from './util'; | ||
import { _hint } from './util' | ||
|
||
export default _hint('compact'); | ||
export default _hint('compact') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
export default function compose(...funcs) { | ||
if (funcs.length === 0) { | ||
return arg => arg; | ||
return arg => arg | ||
} | ||
|
||
if (funcs.length === 1) { | ||
return funcs[0]; | ||
return funcs[0] | ||
} | ||
|
||
const last = funcs[funcs.length - 1]; | ||
const rest = funcs.slice(0, -1); | ||
return (...args) => rest.reduceRight((composed, func) => func(composed), last(...args)); | ||
const last = funcs[funcs.length - 1] | ||
const rest = funcs.slice(0, -1) | ||
return (...args) => rest.reduceRight((composed, func) => func(composed), last(...args)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import _ from 'lodash'; | ||
import { isImmutable } from '../core'; | ||
import _ from 'lodash' | ||
import { isImmutable } from '../core' | ||
|
||
export default function deepClone(customizer) { | ||
const cloner = (data, key, object) => { | ||
if (_.isFunction(customizer)) { | ||
const result = customizer(data, key, object); | ||
const result = customizer(data, key, object) | ||
if (!_.isUndefined(result)) { | ||
return result; | ||
return result | ||
} | ||
} | ||
if (isImmutable(data)) { | ||
data.forEach((value, _key) => { | ||
data = data.set(_key, _.cloneDeepWith(value, cloner)); | ||
}); | ||
return data; | ||
data = data.set(_key, _.cloneDeepWith(value, cloner)) | ||
}) | ||
return data | ||
} | ||
}; | ||
return cloner; | ||
} | ||
return cloner | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export { default as deepClone } from './deepClone'; | ||
export { default as keyIn } from './keyIn'; | ||
export { default as property } from './property'; | ||
export { default as deepClone } from './deepClone' | ||
export { default as keyIn } from './keyIn' | ||
export { default as property } from './property' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import Immutable from 'immutable'; | ||
import Immutable from 'immutable' | ||
|
||
export function keyIn(keys) { | ||
const keySet = Immutable.Set(keys); | ||
const keySet = Immutable.Set(keys) | ||
return (value, key) => { | ||
return keySet.has(key); | ||
}; | ||
return keySet.has(key) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { get } from '../core'; | ||
import { get } from '../core' | ||
export default function property(path) { | ||
return (data) => { | ||
return get(data, path); | ||
}; | ||
return get(data, path) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { _hint } from './util'; | ||
import { _hint } from './util' | ||
|
||
export default _hint('concat'); | ||
export default _hint('concat') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default 1 / 0; | ||
export default 1 / 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default 9007199254740991; | ||
export default 9007199254740991 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { default as INFINITY } from './INFINITY'; | ||
export { default as MAX_SAFE_INTEGER } from './MAX_SAFE_INTEGER'; | ||
export { default as INFINITY } from './INFINITY' | ||
export { default as MAX_SAFE_INTEGER } from './MAX_SAFE_INTEGER' |
Oops, something went wrong.