@alekmarinov/observablestore

RxJS/Observable based memory store

Usage no npm install needed!

<script type="module">
  import alekmarinovObservablestore from 'https://cdn.skypack.dev/@alekmarinov/observablestore';
</script>

README

ObservableStore

RxJS/Observable based memory store

API

Table of Contents

createItem

Creates new item in the store

Parameters

  • item object object to add to store

Returns object the item with added _index property pointing the same item in the store

updateItem

Updates item at specified index

Parameters

  • index number in store to be updated
  • item object object used to update an existing item in the store.

Returns object the updated item

deleteItem

Deletes item at specified index

Parameters

  • index number in store to be deleted

items

Returns all items

Returns array all existing items in the store

item

Return an item at specified index

Parameters

  • index

Returns object an item

size

Return the number of items in the store

Returns number number of items in the store