@dramaorg/maiores-ratione

3.4.27 • Public • Published

@dramaorg/maiores-ratione Version Badge

github actions coverage License Downloads

npm badge

For use with React PropTypes. Will error on any prop not explicitly specified.

Usage

import PropTypes from 'prop-types';
import exact from '@dramaorg/maiores-ratione';

function Foo({ foo, bar }) {
  return <div>{foo}{bar}</div>
}
Foo.propTypes = exact({
  foo: PropTypes.string,
  bar: PropTypes.number,
});

<Foo foo="hi" bar={3} /> // no warnings

<Foo foo="hi" bar={3} baz="extra" /> // propTypes warning!

Tests

Simply clone the repo, npm install, and run npm test

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.4.27
    0
    • latest

Version History

Package Sidebar

Install

npm i @dramaorg/maiores-ratione

Weekly Downloads

376

Version

3.4.27

License

MIT

Unpacked Size

58.3 kB

Total Files

146

Last publish

Collaborators

  • vanthuanbt26