Repository URL to install this package:
|
Version:
0.9.6 ▾
|
// private store = new Map()
// addSidebar(item: SidebarItemState) {
// this.store.set(item.identifier, item)
// }
// or Set if no identifier and using ===
// private store = []
// renderSidebarItem = default
// return this.store.map(handler)
// return fromSetToPairs(this.store).map(([key, value], index) =>
// handler(value, index)
// )
// map(handler: Function) {
// console.info('[Sidebar] map (State)')
// const keyValueArray = fromMapToArray(this.store)
// const iteratee = (valueAtIndex, index: number) => {
// console.info('[Sidebar] map - index: ', index)
// const [identifier, sidebarValue] = valueAtIndex
// handler(sidebarValue, identifier)
// }
// return keyValueArray.map(iteratee)
// }
// this.store.push(item)
// this.store.add(item)