@codes.vault/dsnode
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

DSNode

Create different DataStructures using simple APIs. API available in TypeScript & JavaScript [ES6].



Examples

// ** create a blockchain datastructure
const blockChain = BlockChain.createBlockChain()
blockChain.createBlock({key: 'usd', value: {amount: 540}})
// check is the hash chain is valid 
blockChain.checkValidation()

// ** create stack
const stack = Stack.createStack()
// add data in the stack
stack.push({key: 'a', value: 'apple'})
stack.push({key: 'b', value: {name: 'AbmSourav'}})
// search in the stack by key
stack.search('a');

// ** create a queue
const queue = Queue.createQueue()
queue.enqueue({key: 'a', value: [1, 2, 5]})
queue.enqueue({key: 'sourav', value: {name: "Sourav"}})
// remove item
queue.dequeue()

List of Data Structures:


Contribution Guidelines

Developer Wiki


.

Package Sidebar

Install

npm i @codes.vault/dsnode

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

70.8 kB

Total Files

64

Last publish

Collaborators

  • codes.vault