-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
24 additions
and
13 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
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 @@ | ||
export { default as mergeBase } from './mergeBase'; | ||
export { default as mergeOptions } from './mergeOptions'; | ||
export { default as BaseOptions } from './BaseOptions'; | ||
export { default as mergeOptions } from './mergeBase'; | ||
export { default as DefaultSequentialColor } from './DefaultSequentialColor'; | ||
export { default as DefaultCategoricalColor } from './DefaultCategoricalColor'; |
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,12 +1,12 @@ | ||
import mergeWith from 'lodash-es/mergeWith'; | ||
import MergeCustomizer from './MergeCustomizer'; | ||
|
||
const mergeOptions = (target, source) => { | ||
const merge = (target, source) => { | ||
if (source === undefined || source === null) return target; | ||
|
||
mergeWith(target, source, MergeCustomizer); | ||
|
||
return target; | ||
}; | ||
|
||
export default mergeOptions; | ||
export default merge; |
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,14 +1,14 @@ | ||
import BaseOptions from './BaseOptions'; | ||
import mergeOptions from './mergeOptions'; | ||
import merge from './merge'; | ||
|
||
const mergeBase = (...opts) => { | ||
const mergeOptions = (...opts) => { | ||
const base = Object.assign({}, BaseOptions); | ||
|
||
for (let o of opts) { | ||
mergeOptions(base, o); | ||
merge(base, o); | ||
} | ||
|
||
return base; | ||
}; | ||
|
||
export default mergeBase; | ||
export default mergeOptions; |