| module.exports = function(condition, message) { | ||
| if ("production" !== process.env.NODE_ENV && !condition) { | ||
| var error = new Error(message); | ||
| error.framesToPop = 1; // we don't care about invariant's own frame | ||
| throw error; | ||
| } | ||
| } |
+1
-1
@@ -7,3 +7,3 @@ /** | ||
| var invariant = require('react/lib/invariant') | ||
| var invariant = require('./invariant') | ||
| var _callbacks = [] | ||
@@ -10,0 +10,0 @@ |
+1
-4
| { | ||
| "name": "diode", | ||
| "version": "1.0.0", | ||
| "version": "1.1.0", | ||
| "description": "A simple state propagation tool for Flux/React apps", | ||
@@ -41,6 +41,3 @@ "main": "diode.js", | ||
| "react": ">= 0.12.1" | ||
| }, | ||
| "peerDependencies": { | ||
| "react": ">= 0.12.1" | ||
| } | ||
| } |
+5
-3
| # Diode | ||
| A simple state propagation tool for React. It takes advantage of | ||
| A simple state propagation tool for React. It takes advantage of | ||
| [components that are pure](http://facebook.github.io/react/docs/pure-render-mixin.html) | ||
| to significantly simplify event subscription when propagating changes | ||
| to significantly simplify event subscription when propagating changes | ||
| in the data layer. | ||
| Diode has no dependencies. | ||
| **Diode is an event emitter with one event**. By including the `Stateful` | ||
@@ -12,3 +14,3 @@ mixin, an expected `getState` method is called every time the Diode | ||
| It is also quite small (see [API](#api)). We found ourselves building | ||
| It is also quite small (see [API](#api)). We found ourselves building | ||
| something similar to it on several projects and decided it was better | ||
@@ -15,0 +17,0 @@ to keep it in one place. |
+2
-2
@@ -1,3 +0,3 @@ | ||
| var Diode = require('../diode'); | ||
| var invariant = require('react/lib/invariant'); | ||
| var Diode = require('./diode'); | ||
| var invariant = require('./invariant'); | ||
@@ -4,0 +4,0 @@ var Stateful = { |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
5569
3.65%0
-100%9
12.5%64
12.28%82
2.5%1
Infinity%