alias-props

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i alias-props

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

116 kB

Total Files

5

Last publish

Collaborators

  • m3g4p0p