@zitterorg/velit-autem

3.2.25 • Public • Published

@zitterorg/velit-autem 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 '@zitterorg/velit-autem';

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

Readme

Keywords

Package Sidebar

Install

npm i @zitterorg/velit-autem

Weekly Downloads

405

Version

3.2.25

License

MIT

Unpacked Size

63.6 kB

Total Files

134

Last publish

Collaborators

  • loandinhb931