replace-io

0.0.1 • Public • Published

Replace-io JavaScript.

Motivation.

I noticed some problems with replacement in some situation, if I need to quickly replace some keys in an object, I need to write too many lines of code regarding such a seemingly simple process, and I decided to write this library, maybe it will help someone

Code example.

const replaceIo = require('replace-io');

const anyData = {
  name: 'Alex',
  status: 'offline',
  age: 29,
  job: 'full-stack'
}

/* I want to change some data from this object, but now I can do it with just one function! */

anyData.aReplace(['status', 'job'], ['online', 'engineer']);

console.log(anyData); // => { name: 'Alex', status: 'online', age: 29, job: 'engineer' }

Installation.

npm i replce-io

My contacts.

Package Sidebar

Install

npm i replace-io

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

3.47 kB

Total Files

4

Last publish

Collaborators

  • xannah