Replaced 'startsWith' with RegExp.test()

This commit is contained in:
Luke Bousfield
2017-07-02 10:15:23 -04:00
committed by Stuart Taylor
parent 16bfaa8b21
commit 121f53a20b

View File

@ -90,7 +90,7 @@ function logReplacer(value) {
const replaced = value.map(logReplacer);
return '[' + replaced.join(', ') + ']';
}
if (typeof value === 'string' && !value.startsWith('//')) {
if (typeof value === 'string' && !(/^\/\//).test(value)) {
return '"' + value + '"';
}
if (typeof value === 'number' && isNaN(value)) {