From 405a2454e459928313e5c616c57bf71732cc5586 Mon Sep 17 00:00:00 2001 From: Anusha Anil Kumar Date: Fri, 19 Jan 2024 18:39:37 -0700 Subject: [PATCH] convert string to number --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 0d55554..e2be10e 100644 --- a/src/index.js +++ b/src/index.js @@ -50,7 +50,8 @@ export default class Values { } all(weight = 10) { - return [...this.tints(weight).reverse(), Object.assign(this), ...this.shades(weight)]; + const numberWeight = parseInt(weight) + return [...this.tints(numberWeight).reverse(), Object.assign(this), ...this.shades(numberWeight)]; } hexString() {