rikey
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

🧰 rikey

(pronouned rē-kē, because rekey was taken)

npm NPM npm Coveralls github codecov CircleCI

Useful utilities for manipulating–and creating–Object instances.

Install

Via npm

npm install --save rikey

Via Yarn

yarn add rikey

How to use

reKey

import { reKey } from 'rikey'

const newKeys = reKey({
  oldKey: 'something',
  olderKey: 'nothing',
}, {
  oldKey: 'newKey',
  olderKey: 'newerKey'
})

console.log(newKeys)
Output: { newKey: 'something', newerKey: 'nothing' }

mapKeys

const mappedKeys = mapKeys([0, 1, 2], ['first', 'second', 'third'])
console.lot(mappedKeys)
Output: { first: 0, second: 1, third: 2 }

License

MIT © Ryan Hefner

Package Sidebar

Install

npm i rikey

Weekly Downloads

13

Version

0.1.0

License

MIT

Unpacked Size

20.9 kB

Total Files

13

Last publish

Collaborators

  • ryanhefner