little-state-machine
Advanced tools
Comparing version 2.2.1 to 2.3.0-beta.1
@@ -51,6 +51,10 @@ import * as React from 'react'; | ||
const actionTemplate = ({ options, callback, key, updateStore }) => (payload) => { | ||
const debug = storageType.getItem('__STATE_MACHINE_DEBUG') === 'true'; | ||
if (debug) { | ||
console.log(`%c${key ? options.debugName[key] : options.debugName}`, 'color: #bada55'); | ||
console.log('├─before:', get()); | ||
let debug; | ||
if (process.env.NODE_ENV !== 'production') { | ||
const cloneDeep = require('lodash.clonedeep'); | ||
debug = storageType.getItem('__STATE_MACHINE_DEBUG') === 'true'; | ||
if (debug) { | ||
console.log(`%c${key ? options.debugName[key] : options.debugName}`, 'color: #bada55'); | ||
console.log('├─before:', cloneDeep(get())); | ||
} | ||
} | ||
@@ -62,4 +66,6 @@ set(callback && callback(get(), payload)); | ||
} | ||
if (debug) { | ||
console.log('└─after:', get()); | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (debug) { | ||
console.log('└─after:', get()); | ||
} | ||
} | ||
@@ -66,0 +72,0 @@ }; |
@@ -54,6 +54,10 @@ 'use strict'; | ||
const actionTemplate = ({ options, callback, key, updateStore }) => (payload) => { | ||
const debug = storageType.getItem('__STATE_MACHINE_DEBUG') === 'true'; | ||
if (debug) { | ||
console.log(`%c${key ? options.debugName[key] : options.debugName}`, 'color: #bada55'); | ||
console.log('├─before:', get()); | ||
let debug; | ||
if (process.env.NODE_ENV !== 'production') { | ||
const cloneDeep = require('lodash.clonedeep'); | ||
debug = storageType.getItem('__STATE_MACHINE_DEBUG') === 'true'; | ||
if (debug) { | ||
console.log(`%c${key ? options.debugName[key] : options.debugName}`, 'color: #bada55'); | ||
console.log('├─before:', cloneDeep(get())); | ||
} | ||
} | ||
@@ -65,4 +69,6 @@ set(callback && callback(get(), payload)); | ||
} | ||
if (debug) { | ||
console.log('└─after:', get()); | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (debug) { | ||
console.log('└─after:', get()); | ||
} | ||
} | ||
@@ -69,0 +75,0 @@ }; |
{ | ||
"name": "little-state-machine", | ||
"version": "2.2.1", | ||
"version": "2.3.0-beta.1", | ||
"main": "dist/index.js", | ||
@@ -48,3 +48,6 @@ "module": "dist/index.es.js", | ||
"react-dom": "^16.8.0" | ||
}, | ||
"dependencies": { | ||
"lodash.clonedeep": "^4.5.0" | ||
} | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
179804
269
3
2
5
+ Addedlodash.clonedeep@^4.5.0
+ Addedlodash.clonedeep@4.5.0(transitive)