1.0.0 • Published 6 years ago

escalade-stock-store v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

escalade-stock-store

An event-based store system for getting Escalade Sports stock. Stores all fetched stock in a cookie for quick retrieval.

Installation

yarn add escalade-stock-store

Usage

import StockStore from 'escalade-stock-store'

const stockStore = new StockStore({
	site: `goalrilla`,
	ids: [ `ID1`, `ID2` ]
})

function allChanged(stock){
	console.log(stock)
}

stockStore.addEvent(allChanged)

stockStore.removeEvent(allChanged)