react-helpers

0.0.1 • Public • Published

React Helpers

npm i react-helpers --save-dev

Methods

filterProps

The filterProps method allows you to specify a prefix and create an object that only contains properties with that prefix, it will also lower-case the value of the string without that prefix. Let's run through the example below.

var props = {
  inputOnChange: true,
  formOnSubmit: true
}
 
var inputProps = filterProps(props, 'input')
/*
{
  onChange: true
}
*/

Readme

Keywords

Package Sidebar

Install

npm i react-helpers

Weekly Downloads

2

Version

0.0.1

License

ISC

Last publish

Collaborators

  • reggi