From 6e52930234dfae0029eeed4a9a0e19bf480ec96e Mon Sep 17 00:00:00 2001 From: atomiks Date: Tue, 2 Jan 2018 03:30:33 +1100 Subject: [PATCH] Update prettyBytes.md --- snippets/prettyBytes.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/snippets/prettyBytes.md b/snippets/prettyBytes.md index 8ece6d503..9fc6da983 100644 --- a/snippets/prettyBytes.md +++ b/snippets/prettyBytes.md @@ -2,8 +2,9 @@ Converts a number in bytes to a human-readable string. -Use an array dictionary of units to be accessed based on the exponent. Return the prettified -string by building it up taking into account the supplied options and whether it is +Use an array dictionary of units to be accessed based on the exponent. +Use `Number.toPrecision()` to truncate the number to a certain number of digits. +Return the prettified string by building it up, taking into account the supplied options and whether it is negative or not. ```js