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 2.5.0-beta.3 to 2.5.0

2

dist/index.es.js

@@ -45,2 +45,4 @@ import * as React from 'react';

window['STATE_MACHINE_LOAD'] = ({ storeName, data, }) => {
if (!storeName && !data)
return;
storageType.setItem(getName(), data || storageType.getItem(storeName));

@@ -47,0 +49,0 @@ };

@@ -48,2 +48,4 @@ 'use strict';

window['STATE_MACHINE_LOAD'] = ({ storeName, data, }) => {
if (!storeName && !data)
return;
storageType.setItem(getName(), data || storageType.getItem(storeName));

@@ -50,0 +52,0 @@ };

2

package.json
{
"name": "little-state-machine",
"version": "2.5.0-beta.3",
"version": "2.5.0",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.es.js",

@@ -74,12 +74,13 @@ <div align="center"><img src="https://github.com/bluebill1049/little-state-machine/blob/master/docs/logo.png" alt="React forme Logo - React hook form valiation" width="180px" />

##### 🔗 `window.STATE_MACHINE_LOAD`
Load saved state into your app, you can either supply a session/local storage name, or supply a string of data.
Load saved state into your app, you can either supply a name of your session/local storage, or supply a string of data.
`window.STATE_MACHINE_GET_STORE({ storeName: string, data: Object })`
`window.STATE_MACHINE_GET_STORE({ storeName?: string, data?: Object })`
storeName: external session/local storage name
data: string of data
`storeName`: external session/local storage name
`data`: string of data
## Example
app.js
📋 `app.js`
```jsx

@@ -105,3 +106,3 @@ import React from 'react'

yourComponent.js
📋 `yourComponent.js`
```jsx

@@ -122,3 +123,3 @@ import React from 'react'

yourDetail.js
📋 `yourDetail.js`
```js

@@ -130,3 +131,3 @@ export default {

action.js
📋 `action.js`
```js

@@ -133,0 +134,0 @@ export function updateName(state, payload) {

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