Skip to content

Commit

Permalink
feat(get): update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tahul committed Jul 19, 2022
1 parent fd1a660 commit 0805494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const DesignTokensType =
}`

const getFunction =
`const get = (obj, path, defValue) => {
`const get = (obj, path, defValue = undefined) => {
if (!path) return undefined
const pathArray = Array.isArray(path) ? path : path.match(/([^[.\\]])+/g)
const result = pathArray.reduce(
Expand Down

0 comments on commit 0805494

Please sign in to comment.