Skip to content

Commit

Permalink
Add getDefaultWebpack4
Browse files Browse the repository at this point in the history
  • Loading branch information
HillLiu committed Apr 6, 2018
1 parent 373a8ab commit 722d669
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/lib/get-object-value/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "get-object-value",
"version": "0.0.10",
"version": "0.0.11",
"description": "Get Object Value",
"repository": "react-atomic/react-atomic-organism",
"main": "./build/src/index.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/lib/get-object-value/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const getDefaultValue = (v) => {
return v;
}

const getObjectValue = (o, path, defaultValue) => {
const get = (o, path, defaultValue) => {
if (null === o || 'undefined' === typeof o) {
return getDefaultValue(defaultValue);
}
Expand All @@ -29,8 +29,8 @@ const getObjectValue = (o, path, defaultValue) => {
return current;
};

const getDefault = o => getObjectValue(o, ['default'], o);
const getWebpack4Default = o => get(o, ['default', 'default'], () => get(o, ['default'], o) );

export default getObjectValue;
export default get;

export {getDefault};
export {getWebpack4Default as getDefault};

0 comments on commit 722d669

Please sign in to comment.