Gathering detailed insights and metrics for @rioam2/bstjs
Gathering detailed insights and metrics for @rioam2/bstjs
Gathering detailed insights and metrics for @rioam2/bstjs
Gathering detailed insights and metrics for @rioam2/bstjs
🌴 Basic Dictionary ADT implementation using a Binary-Search-Tree (BST) in Javascript
npm install @rioam2/bstjs
Typescript
Module System
Node Version
NPM Version
TypeScript (69.18%)
JavaScript (30.82%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
33 Commits
1 Watchers
6 Branches
1 Contributors
Updated on Apr 15, 2021
Latest Version
1.0.1
Package Id
@rioam2/bstjs@1.0.1
Unpacked Size
29.61 kB
Size
6.58 kB
File Count
13
NPM Version
6.4.1
Node Version
8.12.0
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
4
BSTjs is an npm package for Node.JS that implements the Dictionary ADT using a Binary Search Tree (BST) data structure. The codebase is written in TypeScript with ES6 features which is transpiled to ES5 for compatibility.
For more information on implementation, please read my development article on Medium here: Implementation Details
findNode
for before/after recursion processes (used for balancing calls).[]
).for ... of
loops.Contributions to this project are more than welcome! If you can help with any of the above todo items, here is a timeline for submitting your work that will ensure peace-of-mind for everyone:
./tests/test.js
file. Once all tests are passing, squash all of your commits and send a pull request. Please do not merge with the master branch yet.If you feel that I have made any oversights in the contributing checklist above, please let me know by opening an issue.
The BST class contains all necessary ADT functionality as specified here
insert(key: any
, value: any
) : void
Inserts a new key/value pair into the Binary Search Tree
get(key: any
) : any
Gets the data associated with the supplied key. Returns null if no such key is present in the Binary Search Tree.
remove(key: any
) : void
Removes data with the supplied key from the Binary Search Tree
isEmpty() : bool
Returns true of no data is in the Binary Search Tree and false if the structure stores any data
levelOrderTraversal() : any[]
Returns an array of values in a level-order traversal of the binary-search-tree.
preOrderTraversal() : any[]
Returns an array of values in a pre-order traversal of the Binary Search Tree
inOrderTraversal() : any[]
Returns an array of values in a post-order traversal of the Binary Search Tree. This traversal will return a sorted array of values based on key by definition.
postOrderTraversal() : any[]
Returns an array of values in a post-order traversal of the Binary Search Tree.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
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
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
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