Skip to content

Commit

Permalink
replace substring() with slice() (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveneman authored Jun 2, 2024
1 parent f1bf1e8 commit f6c06a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

/**
Expand All @@ -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)
}

/**
Expand Down

0 comments on commit f6c06a6

Please sign in to comment.