little-state-machine
Advanced tools
Comparing version 3.0.1 to 3.0.2
{ | ||
"name": "little-state-machine", | ||
"sideEffects": false, | ||
"version": "3.0.1", | ||
"main": "dist/index.js", | ||
"module": "dist/index.es.js", | ||
"version": "3.0.2", | ||
"main": "dist/little-state-machine.js", | ||
"module": "dist/little-state-machine.es.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"clean": "rimraf dist/*", | ||
"build": "rollup -c", | ||
"prebuild": "yarn clean", | ||
"build": "yarn build:modern && yarn build:umd && yarn build:ie11 && yarn build:min", | ||
"build:modern": "rollup -c ./rollup/rollup.config.js", | ||
"build:umd": "rollup -c ./rollup/rollup.umd.config.js", | ||
"build:min": "rollup -c ./rollup/rollup.min.config.js", | ||
"build:ie11": "rollup -c ./rollup/rollup.ie11.config.js", | ||
"watch": "tsc --watch", | ||
@@ -26,2 +31,9 @@ "release": "npm version", | ||
"devDependencies": { | ||
"@babel/core": "^7.9.6", | ||
"@babel/plugin-transform-runtime": "^7.9.6", | ||
"@babel/runtime-corejs3": "^7.9.6", | ||
"@rollup/plugin-babel": "^5.0.2", | ||
"@rollup/plugin-commonjs": "^12.0.0", | ||
"@rollup/plugin-node-resolve": "^8.0.0", | ||
"@rollup/plugin-replace": "^2.3.2", | ||
"@types/enzyme": "^3.9.0", | ||
@@ -41,3 +53,4 @@ "@types/enzyme-adapter-react-16": "^1.0.5", | ||
"rimraf": "^2.6.3", | ||
"rollup": "^1.6.0", | ||
"rollup": "^2.10.9", | ||
"rollup-plugin-terser": "^6.1.0", | ||
"rollup-plugin-typescript2": "^0.19.2", | ||
@@ -44,0 +57,0 @@ "ts-jest": "^24.0.0", |
@@ -205,1 +205,32 @@ <div align="center"><a href="https://lrz5wloklm.csb.app/"><img src="https://github.com/bluebill1049/little-state-machine/blob/master/docs/logo.png?raw=true" alt="Little State Machine - React Hooks for state management" width="140px" /></a> | ||
</div> | ||
<h2>Browser Compatibility</h2> | ||
Little State Machine supports all major browsers | ||
For legacy IE11 support, you can import little-state-machine IE11 version. | ||
```js | ||
import { createStore } from 'little-state-machine/dist/little-state-machine.ie11' | ||
``` | ||
<h2>Polyfill</h2> | ||
Consider adding `Object.entries()` polyfill if you're wondering to have support for old browsers. | ||
You can weather consider adding snippet below into your code, ideally before your App.js file: | ||
📋 `utils.[js|ts]` | ||
```js | ||
if (!Object.entries) { | ||
Object.entries = function( obj ){ | ||
var ownProps = Object.keys( obj ), | ||
i = ownProps.length, | ||
resArray = new Array(i); // preallocate the Array | ||
while (i--) | ||
resArray[i] = [ownProps[i], obj[ownProps[i]]]; | ||
return resArray; | ||
}; | ||
} | ||
``` | ||
Or you can add [core-js](https://github.com/zloirock/core-js) polyfill into your project and add `core-js/es/object/entries` in your `polyfills.[js|ts]` file. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
49496
23
1025
236
27
1
5