Skip to content

Commit

Permalink
fix: add basic jsDoc typing
Browse files Browse the repository at this point in the history
  • Loading branch information
barelyhuman committed Nov 25, 2023
1 parent f08a282 commit ff6e0fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/djb2.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {string} toHash
* @return {string}
*/
export const djb2 = function djb2(toHash) {
let hash = 5381
let c
Expand Down
8 changes: 8 additions & 0 deletions src/sdbm.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @param {string} toHash
* @return {string}
*/
export function sdbm(toHash) {
let hash = BigInt(0)
let c
Expand All @@ -10,6 +14,10 @@ export function sdbm(toHash) {
return '' + hash
}

/**
* @param {string} toHash
* @return {string}
*/
export function sdbmGawk(toHash) {
let hash = BigInt(0)

Expand Down

0 comments on commit ff6e0fa

Please sign in to comment.