Gathering detailed insights and metrics for bindable-collection
Gathering detailed insights and metrics for bindable-collection
Gathering detailed insights and metrics for bindable-collection
Gathering detailed insights and metrics for bindable-collection
npm install bindable-collection
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
2 Stars
5 Commits
2 Watchers
1 Branches
1 Contributors
Updated on Jan 28, 2023
Latest Version
0.0.2
Package Id
bindable-collection@0.0.2
Size
3.43 kB
NPM Version
2.1.4
Node Version
0.10.30
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
bindable.Collection operates like arrays, except they're watchable if anything changes.
npm install bindable-collection --save-exact
The constructor
1var BindableCollection = require("bindable-collection"); 2var items = new BindableCollection([1, 2, 3]); 3console.log(items.at(0)); 4console.log(items.at(1)); 5console.log(items.at(2)); 6console.log(items.source);
The source of the collection. This is an array.
Resets the source of the collection. You can also do this by calling set('source', array)
1var BindableCollection = require("bindable-collection"); 2var items = new BindableCollection([1, 2, 3]); 3console.log(items.source); 4items.reset([4, 5, 6]); 5console.log(items.source); 6items.set("source", [7, 8, 9]); 7console.log(items.source);
returns the index of an item
1var BindableCollection = require("bindable-collection"); 2var items = new BindableCollection([1, 2, 3]); 3console.log(items.indexOf(1));
returns an item at the given index
iterates through the collection. similar to array.forEach.
pushes items to the end of the collection.
unshifts items to the beginning of the collection.
removes items from the collection
pops the last item off the collection
removes the first item from the collection
insert
- emitted when items are insertedupdate
- emitted when the collection is updatedreset
- emitted when the source has been resetremove
- emitted when items have been removed1var BindableCollection = require("bindable-collection"); 2var items = new BindableCollection([1, 2, 3]); 3 4items.on("insert", function (result) { 5 console.log("insert ", result); 6}); 7 8items.on("remove", function (result) { 9 console.log("remove ", result); 10}); 11 12items.on("update", function (result) { 13 console.log("update ", result); 14}); 15 16items.on("reset", function (result) { 17 console.log("reset ", result); 18}); 19 20items.reset([2, 3, 4]); 21items.splice(1, 2); 22items.push(6); 23items.pop(); 24items.shift();
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/5 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More