Socket
Book a DemoInstallSign in
Socket

prop-types-range

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prop-types-range

Number range prop type validation

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

prop-types-range Build Status

Number range prop type validation

Install

$ npm install prop-types-range

Usage

import React from 'react';
import propTypesRange from 'prop-types-range';

const Component = ({number}) => (
	<div>{number} is between 1 and 5</div>
);

Component.propTypes = {
	number: propTypesRange(1, 5)
};

API

propTypesRange(min, max)

min

Type: number

Minumum value of prop.

max

Type: number

Maximum value of prop.

Keywords

number

FAQs

Package last updated on 18 Sep 2019

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