From b1f1390b6b8bab12841ef38c3ec3e12846dae1b9 Mon Sep 17 00:00:00 2001 From: 30secondsofcode <30secondsofcode@gmail.com> Date: Wed, 17 Jan 2018 07:24:58 +0000 Subject: [PATCH] Travis build: 1276 --- README.md | 2 +- docs/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8d779f04..90f5ba61f 100644 --- a/README.md +++ b/README.md @@ -3683,7 +3683,7 @@ round(1.005, 2); // 1.01
[⬆ Back to top](#table-of-contents) -### sbdm +### sdbm Hashes the input string into a whole number. diff --git a/docs/index.html b/docs/index.html index 6aa025fbc..5a4358afd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -796,7 +796,7 @@ own individual rating by supplying it as the third argument.
randomNumberInRange(2, 10); // 6.0211363285087005
 

round

Rounds a number to a specified amount of digits.

Use Math.round() and template literals to round the number to the specified number of digits. Omit the second argument, decimals to round to an integer.

const round = (n, decimals = 0) => Number(`${Math.round(`${n}e${decimals}`)}e-${decimals}`);
 
round(1.005, 2); // 1.01
-

sbdm

Hashes the input string into a whole number.

Use String.split('') and Array.reduce() to create a hash of the input string, utilizing bit shifting.

const sdbm = str => {
+

sdbm

Hashes the input string into a whole number.

Use String.split('') and Array.reduce() to create a hash of the input string, utilizing bit shifting.

const sdbm = str => {
   let arr = str.split('');
   return arr.reduce(
     (hashCode, currentVal) =>