Skip to content

Commit 7e9bf6f

Browse files
committed
make sure const and let replacements are not in the middle of words
1 parent d11eb9e commit 7e9bf6f

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

build/common-replacements.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ module.exports.objectKeysReplacement = [
4141
]
4242

4343
module.exports.constReplacement = [
44-
/const/g
44+
/\bconst\b/g
4545
, 'var'
4646
]

build/files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const headRegexp = /(^module.exports = \w+;?)/m
146146
]
147147
,
148148
letReplacements = [
149-
/let/g
149+
/\blet\b/g
150150
, 'var'
151151
]
152152
module.exports['_stream_duplex.js'] = [

lib/_stream_readable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ Readable.prototype.read = function(n) {
337337
// All the actual chunk generation logic needs to be
338338
// *below* the call to _read. The reason is that in certain
339339
// synthetic stream cases, such as passthrough streams, _read
340-
// may be a compvarely synchronous operation which may change
340+
// may be a completely synchronous operation which may change
341341
// the state of the read buffer, providing enough data when
342342
// before there was *not* enough.
343343
//

test/common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ exports.hasIPv6 = objectKeys(ifaces).some(function(name) {
234234

235235
function protoCtrChain(o) {
236236
var result = [];
237-
for (; o; o = o.__proto__) { result.push(o.varructor); }
237+
for (; o; o = o.__proto__) { result.push(o.constructor); }
238238
return result.join();
239239
}
240240

@@ -314,7 +314,7 @@ var knownGlobals = [setTimeout,
314314
clearInterval,
315315
clearImmediate,
316316
console,
317-
// varructor, // Enumerable in V8 3.21.
317+
constructor, // Enumerable in V8 3.21.
318318
Buffer,
319319
process,
320320
global];

0 commit comments

Comments
 (0)