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

deku-prop-types-immutable

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deku-prop-types-immutable

Immutable prop type validation for Deku components

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90.91%
Maintainers
1
Weekly downloads
 
Created
Source

deku-prop-types-immutable

NPM version Build Status Coverage Status

Code Climate Dependencies DevDependencies

Immutable prop type validation for Deku components

Install

npm install --save deku-prop-types-immutable

Usage

Note: These Prop Type Validators are meant to be used alongside deku-prop-types

function-component.jsx

import {element} from 'deku'
import ImmutablePropTypes from 'deku-prop-types-immutable'
import {PropTypes, validate} from 'deku-prop-types'

const Counter = ({props}) => <div>{props.count}</div>
Count.propTypes = {
  count: PropTypes.number.isRequired,
  config: ImmutablePropTypes.Map
}

export default validate(Counter)

object-component.jsx

import {element} from 'deku'
import ImmutablePropTypes from 'deku-prop-types-immutable'
import {PropTypes, validate} from 'deku-prop-types'

const Counter = {
  propTypes: {
    count: PropTypes.number.isRequired,
    config: ImmutablePropTypes.Map
  },
  render({props}) {
    return <div>{props.count}</div>
  }
}

export default validate(Counter)

Supported types

ImmutablePropTypes.Iterable

Validate prop is an Immutable.Iterable

ImmutablePropTypes.List

Validate prop is an Immutable.List

ImmutablePropTypes.Map

Validate prop is an Immutable.Map

ImmutablePropTypes.OrderedMap

Validate prop is an Immutable.OrderedMap

ImmutablePropTypes.OrderedSet

Validate prop is an Immutable.OrderedSet

ImmutablePropTypes.Record

Validate prop is an Immutable.Record

ImmutablePropTypes.Set

Validate prop is an Immutable.Set

ImmutablePropTypes.Seq

Validate prop is an Immutable.Seq

ImmutablePropTypes.Stack

Validate prop is an Immutable.Stack

License

MIT © Dustin Specker

Keywords

FAQs

Package last updated on 29 Jan 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

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