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

immutable-schema

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immutable-schema

Schema validator for immutable js structures

latest
Source
npmnpm
Version
0.5.2
Version published
Maintainers
1
Created
Source

immutable-js-schema

npm Build Status Document Dependencies

Schema validator for immutable-js structures

Getting Started

npm install immutable-schema

Then,

import {
    ListSchema, FixedListSchema, MapSchema, Exactly, OneOf
} from 'immutable-schema';

Examples

const schema = FixedListSchema(isString, isNumber, Exactly('greetings'));
const list = List.of('hi', 14.5, 'greetings');
assert.ok(schema(list));
const schema = MapSchema(
    isString, isNumber,
    v => isNumber(v) && (v % 2 === 0), isString
);

assert.ok(schema(
    Map().set('hi', 5).set(14, 'roar')
));

FAQs

Package last updated on 14 Mar 2016

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