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

uncontrollable

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uncontrollable - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

12

lib/uncontrollable.js

@@ -18,8 +18,16 @@ "use strict";

var version = React.version.split(".").map(parseFloat);
function getType(component) {
if (version[0] === 0 && version[1] >= 13) return component;
return component.type;
}
module.exports = function (Component, controlledValues, taps) {
var types = {};
if (process.env.NODE_ENV !== "production" && Component.type.propTypes) {
if (process.env.NODE_ENV !== "production" && getType(Component).propTypes) {
types = transform(controlledValues, function (obj, handler, prop) {
var type = Component.type.propTypes[prop];
var type = getType(Component).propTypes[prop];

@@ -26,0 +34,0 @@ invariant(typeof handler === "string" && handler.trim().length, "Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable", Component.displayName, prop);

2

package.json
{
"name": "uncontrollable",
"version": "1.1.0",
"version": "1.1.1",
"description": "Wrap a controlled react component, to allow spcific prop/handler pairs to be uncontrolled",

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

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