0.1.0 • Published 8 years ago
alias-props
Licence
MIT
Version
0.1.0
Deps
0
Size
113 kB
Vulns
0
Weekly
0
alias-props
Specify aliases for object properties.
Installation
yarn add alias-props
Usage
const aliasProps = require('alias-props')
const doSomething = options => {
const {
importantNote = 'Remember buying milk!',
failSilently = false
} = aliasProps(options, {
importantNote: ['cleverComment', 'remarkableRemark'],
failSilently: ['ignoreError']
})
// ...
}
doSomething({ ignoreError: true })
License
MIT