npm

Join us for the "JavaScript Supply Chain Security" tech talk, presented by VP of Security, Adam Baldwin. 6/20 at 10am PT.Sign up here »

This package has been deprecated

Author message:

use scoped package: @pubcore/state

pubcore-state

1.0.2 • Public • Published

Build Status

Access property of global state by dot-notation string

Install

npm install --dev pubcore-state

How to use example, in context with a redux store

Initialization in main script is required

import {setStore} from 'pubcore-state'

//we expect a reduxStore has been created before
setStore(reduxStore)

If we want to read a property of global State ...

import S from 'pubcore-state'

var book = S('room.shelf.b1')

//returns undefined if a key does not exist
S('key.does.not.exist') === undefined

Keywords

none

install

npm i pubcore-state

Downloadsweekly downloads

2

version

1.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability