Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

henrybuilt-react-library

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

henrybuilt-react-library - npm Package Compare versions

Comparing version 1.0.39 to 1.0.40

2

package.json
{
"name": "henrybuilt-react-library",
"version": "1.0.39",
"version": "1.0.40",
"description": "",

@@ -5,0 +5,0 @@ "author": "maxhudson",

@@ -34,3 +34,3 @@ import {_, Component, PropTypes} from 'components';

var constrainedValue = this.constrain(value);
var valueWasConstrained = !_.isEqual(value, constrainedValue);
var valueWasConstrained = value != constrainedValue; //HINT intentional use of type unsafe comparison to compare numbers and strings
var shouldTriggerChange = (this.props.triggerChangeOnClean && !_.isEqual(constrainedValue, this.props.value)) || !_.isEqual(value, this.props.value);

@@ -37,0 +37,0 @@

@@ -79,3 +79,8 @@ import {_, React, Component} from 'components';

constrain(value) {
if (typeof(value) !== 'string') value = '';
if (typeof(value) === 'number') {
value = `${value}`;
}
else if (typeof(value) !== 'string') {
value = '';
}

@@ -82,0 +87,0 @@ return value;

@@ -56,2 +56,9 @@ import {React, Component, mount} from 'test';

expect(wrapper.find(Form).state().textInputValue).toEqual('12');
expect(wrapper.find(TextInput).props().value).toEqual('12');
expect(wrapper.find('input').props().value).toEqual('12');
wrapper.find('input').simulate('change', {target: {value: [1, 2, 3]}});
wrapper.find('input').simulate('blur');
expect(wrapper.find(Form).state().textInputValue).toEqual('');

@@ -58,0 +65,0 @@ expect(wrapper.find(TextInput).props().value).toEqual('');

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc