Skip to content

Commit

Permalink
lint: remove deprecated String.prototype.substr
Browse files Browse the repository at this point in the history
closes #20
  • Loading branch information
CommanderRoot authored and dougwilson committed Jan 27, 2023
1 parent 1f0b5a4 commit 5140632
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 @@ -119,7 +119,7 @@ function parse (string) {

var index = header.indexOf(';')
var type = index !== -1
? header.substr(0, index).trim()
? header.slice(0, index).trim()
: header.trim()

if (!TYPE_REGEXP.test(type)) {
Expand Down Expand Up @@ -148,7 +148,7 @@ function parse (string) {
if (value[0] === '"') {
// remove quotes and escapes
value = value
.substr(1, value.length - 2)
.slice(1, -1)
.replace(QESC_REGEXP, '$1')
}

Expand Down

0 comments on commit 5140632

Please sign in to comment.