Socket
Socket
Sign inDemoInstall

immutable-nestable-record

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    immutable-nestable-record

Record factory that supports nesting of Immutable.js recods and collections


Version published
Weekly downloads
177
decreased by-21.68%
Maintainers
1
Install size
211 kB
Created
Weekly downloads
 

Readme

Source

Immutable Nestable Record

Record factory that supports nesting of Immutable.js recods and collections.

const Point = Immutable.Record({x: 0, y: 0}, 'Point');

const Rect = NestableRecord({
  a: null,
  b: null,
}, {
  a: Point,
  b: Point,
}, 'Rect');

Rect({a: {x: 1, y: 1}, b: {x: 2, y: 2}});
// => Rect { "a": Point { "x": 1, "y": 1 }, "b": Point { "x": 2, "y": 2 } }

const PointCloud = NestableRecord({
  points: null,
}, {
  points: [Immutable.Set, Point],
}, 'PointCloud');

PointCloud({points: [{x: 1, y: 1}, {x: 2, y: 2}]});
// => PointCloud { "points": Set { Point { "x": 1, "y": 1 }, Point { "x": 2, "y": 2 } } }

Keywords

FAQs

Last updated on 03 Sep 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc