New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

state-ts

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

state-ts

Easy state management in Javascript or Typescript.

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
1
-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

README

Intoduction

state-ts is an extremely simple state service that handles your state for you.

Written in Typescript.

Installation

Using NPM

$ npm i state-ts --save

Using Yarn

$ yarn add state-ts

Usage

import { State } from 'state-ts';

const maxStackSize = 100;
const state = new State(maxStackSize);

state.Change({
    myNewProperty: 12
});

// test code
expect(state.Current.myNewProperty).to.equal(12);

state.Change({
    myNewProperty: 13
});

// test code
expect(state.Current.myNewProperty).to.equal(13);

state.Rollback(1);

// test code
expect(state.Current.myNewProperty).to.equal(12);

state.FastForward(1);

// test code
expect(state.Current.myNewProperty).to.equal(13);

FAQs

Package last updated on 20 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts