propable-immutable

0.1.2 • Public • Published

Propable-Immutable wercker status

A collection of immutable.js prop types extending propable.

API Reference

Installing / Getting Started

Install the package

npm install --save propable-immutable

and import/require it

import { propTypes } from 'propable-immutable';
// OR (pre ES6)
var propTypes = require('propable-immutable').propTypes;

Usage

const o = { key: 'value' };
 
propTypes.Map.test(o); // true
propTypes.Map.parse(o); // Map { key: 'value' }
propTypes.Map.parse(JSON.stringify(o)); // Map { key: 'value' }
 
propTypes.List.test(o); // false

Developing

This is what you do after you have cloned the repository:

npm install
npm run build

(Install dependencies & build the project.)

Linting

Execute ESLint

npm run lint

Try to automatically fix linting errors

npm run lint:fix

Testing

Execute Jest unit tests using

npm test

Tests are defined in the same directory the module lives in. They are specified in '[module].test.js' files.

Building

To build the project, execute

npm run build

This saves the production ready code into 'dist/'.

Package Sidebar

Install

npm i propable-immutable

Weekly Downloads

0

Version

0.1.2

License

BSD-3-Clause

Last publish

Collaborators

  • mlpxbrachmann