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

deku-prop-types

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deku-prop-types - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

14

lib/validate.js

@@ -7,5 +7,7 @@ 'use strict';

* @param {Object} props - an object to check for missing propTypes
* @param {Number} warningLevel - should warn when missing propType discovered
* @param {Number} warningLevel - should warn/error when missing propType discovered
* 0 - do not warn
* 1 - console.warn
* 2 - throw Error
* @throws {Error} - if warningLevel is 2 and missing propType discovered
*/

@@ -23,3 +25,11 @@ var warnOfMissingPropTypes = function warnOfMissingPropTypes(propTypes, props, warningLevel) {

}).forEach(function (missingProp) {
console.warn('Missing `' + missingProp + '` propType');
var msg = 'Missing `' + missingProp + '` propType';
if (warningLevel === 1) {
console.warn(msg);
}
if (warningLevel === 2) {
throw new Error(msg);
}
});

@@ -26,0 +36,0 @@ };

2

package.json
{
"name": "deku-prop-types",
"version": "0.4.0",
"version": "0.4.1",
"description": "Prop type validation for Deku components",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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