Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

extendable-immutable

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

extendable-immutable

Wraps around Immutable.js to turn it inheritable

  • 1.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Wrapper classes around Immutable.js that turn it inheritable

Extendable Immutable.js

About

Ever wished that you could have OrderedMaps, Maps or Lists with extra methods, that make your life easier? .ofCourse()!

  • Behaves like normal Immutable.js data structures
  • Doesn't break Immutable.js' inheritance (*.is and instanceof still pass!)

Getting Started

Installing the latest version via npm takes just a second:

npm install --save extendable-immutable

Import what you need:

import { OrderedMap } from 'extendable-immutable'

class Collection extends OrderedMap {
// ...

Quick Intro

import { OrderedMap } from 'extendable-immutable'

class Collection extends OrderedMap {
  static isCollection(val) {
    return val && val instanceof Collection;
  }

  doMagic() {
    return this.map(x => x.set("magic", true));
  }
}

const magic = new Collection();

magic instanceof Immutable.OrderedMap; // true
Immutable.OrderedMap.isOrderedMap(magic); // true

Keywords

FAQs

Package last updated on 18 May 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc