New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

easy-immutable

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-immutable

A light weight immutable object implementation

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

easy-immutable

A light weight implementation of an immutable object. You can pass this object around to ensure data safety through out your application.

Usage

The usage is simply to pass an existing object into the Immutable to receive an object of type Immutable with all the same properties of the original object

const im = new Immutable({ foo: 'bar });
console.log(`foo is ${im.foo}`);     // results in 'foo is bar'

The immutable will enumerate down through the object structure including arrays, only primitive types like strings, numbers, etc will be excluded

const im = new Immutable({ one: { foo: 'bar' } });
console.log(R.is(Immutable, im.one));    // results in true

Errors

Trying to set a value on an immutable object will result in an TypeError being thrown

const im = new Immutable({ foo: 'bar' });
im.foo = 'baz';     // received a TypeError

Keywords

immutable

FAQs

Package last updated on 24 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts