Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

MD4/i

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

i

NPM Version Build Status Dependency Status devDependency Status Coverage Status

A (very) simple library to expose only clones of referenced objects in function arguments.

Installation

npm install i-

Usage

Require

var i = require('i-');
// or simply
require('i-');

Example

var a = { a: 1, b: 2 };

var transform = (obj => {
  obj.b = 3;
  return obj;
}).i;

// or

transform = i(obj => {
  obj.b = 3;
  return obj;
});

// or

transform = i(function(obj) {
  obj.b = 3;
  return obj;
});

// or

transform = function(obj) {
  obj.b = 3;
  return obj;
}.i;

console.log(a);
console.log(transform(a));
console.log(a);

test

npm test

Notes

I still have no idea if it is a stupid or good idea.

About

A (very) simple library to expose only clones of referenced objects in function arguments.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors