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

little-state-machine

Package Overview
Dependencies
Maintainers
1
Versions
210
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

little-state-machine - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0-beta.1

dist/little-state-machine.es.js

25

package.json
{
"name": "little-state-machine",
"sideEffects": false,
"version": "3.0.1",
"main": "dist/index.js",
"module": "dist/index.es.js",
"version": "3.1.0-beta.1",
"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",

@@ -52,2 +65,2 @@ "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.
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