Skip to content

Commit 9b33412

Browse files
replace deprecated String.prototype.substr() (#876)
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated. Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
1 parent c0805cc commit 9b33412

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function setup(env) {
179179
namespaces = split[i].replace(/\*/g, '.*?');
180180

181181
if (namespaces[0] === '-') {
182-
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
182+
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
183183
} else {
184184
createDebug.names.push(new RegExp('^' + namespaces + '$'));
185185
}

0 commit comments

Comments
 (0)