npm.io
0.0.1 • Published 10 years ago

react-helpers

Licence
ISC
Version
0.0.1
Deps
0
Vulns
0
Weekly
0

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
}
*/

Keywords