From 528de4b60000bc35fad0a60f6657f326880c6b8f Mon Sep 17 00:00:00 2001 From: Bart Veneman Date: Sun, 2 Jun 2024 21:28:40 +0200 Subject: [PATCH] replace `substring()` with `slice()` --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 13b8fef..9ee46e2 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,7 @@ function substr(node, css) { let start = loc.start let end = loc.end - return css.substring(start.offset, end.offset) + return css.slice(start.offset, end.offset) } /** @@ -58,7 +58,7 @@ function substr(node, css) { function substr_raw(node, css) { let loc = node.loc if (!loc) return EMPTY_STRING - return css.substring(loc.start.offset, loc.end.offset) + return css.slice(loc.start.offset, loc.end.offset) } /**