Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Merge dbc38b6 into d3baf12
Browse files Browse the repository at this point in the history
  • Loading branch information
cvan committed Mar 7, 2018
2 parents d3baf12 + dbc38b6 commit f9dc0c4
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions trieNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,17 @@ function removeHexPrefix (val) {
return val
}

/*
* Detrimines if a key has Arnold Schwarzenegger in it.
/**
* Determines if a key has Arnold Schwarzenegger in it.
* @method isTerminator
* @param {Array} key - an hexprefixed array of nibbles
*/
function isTerminator (key) {
return key[0] > 1
}

/*
* Converts a string OR a buffer to a nibble array
/**
* Converts a string OR a buffer to a nibble array.
* @method stringToNibbles
* @param {Buffer| String} key
*/
Expand All @@ -215,8 +215,8 @@ function stringToNibbles (key) {
return nibbles
}

/*
* Converts a nibble array into a buffer
/**
* Converts a nibble array into a buffer.
* @method nibblesToBuffer
* @param arr
*/
Expand All @@ -229,13 +229,13 @@ function nibblesToBuffer (arr) {
return buf
}

/*
* Determines the node type
* Returns the following
* - leaf - if teh node is a leaf
* - branch - if the node is a branch
* - extention - if the node is an extention
* - unknown - if somehting fucked up
/**
* Determines the node type.
* @returns {String} - the node type
* - leaf - if the node is a leaf
* - branch - if the node is a branch
* - extention - if the node is an extention
* - unknown - if something else got borked
*/
function getNodeType (node) {
if (node.length === 17) {
Expand Down

0 comments on commit f9dc0c4

Please sign in to comment.