barfijsdeprecated

Sweetest and simplest state manager

Usage no npm install needed!

<script type="module">
  import barfijs from 'https://cdn.skypack.dev/barfijs';
</script>

README

SweetestšŸ˜‹ and Simplest way to manage your state.

npmNPM

barfijs is a simple JavaScript global state manager.

Installation

Use the JavaScript package manager NPM or Yarn to install barfijs

NPM

npm install barfijs

Yarn

yarn add barfijs

Usage

Store

Barfi Store

import { BarfiStore } from "barfijs";

const store = BarfiStore(); // access whole store

PUT state

PutState function used to create or update state.

import { PutState } from "barfijs";

PutState(propertyName, value, callback([value, store])); // create state

PutState(propertyName, newValue, callback([updatedvalue, store])); // update state

GET state

GetState function used to retrieve a state.

import { GetState } from "barfijs";

const state = GetState(propertyName);

DELETE state

DeleteState function used to delete a state.

import { DeleteState } from "barfijs";

const state = DeleteState(propertyName, callback([deletedValue, store]));

Contributing

Pull requests are welcome. For major and minor changes and bugs, please open an issue first to discuss what you would like to change and about fixing bug/s.

License

MIT

Creater @usama__asfar