0.0.7 • Published 3 years ago

dijes-collection v0.0.7

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

dijes-Collection

Download

npm install dijes-collection --save

Using

const Collection = require("dijes-collection")
var collection = new Collection({limit:-1}) // -1 - infinity elements, for change the limit of elements provide the positive number

Add elements

collection.set("1",{ number:1, text:"first element"})
// [["1"], [{number:1, text:"first element"}]]

Remove items

collection.set("1", 1)
//[["1"], [1]]
collection.remove("1")
//[[], []]

Check availability items

collection.set("foo", "bar")

collection.has("foo") //true
collection.has("bar") //false

Get items

collection.set("foo", "bar")

collection.get("foo")//"bar"
0.0.5

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago