This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/******************************************************************************/ | |
console.log('Requiring modules...'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const readline = require('readline'); | |
const execSync = require('child_process').execFileSync; | |
const urlParser = require('url'); | |
const jsdom = require('jsdom'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[enforcing Ignition and TurboFan for ObjectConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Uint8ArrayConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Int8ArrayConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Uint16ArrayConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Int16ArrayConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Uint32ArrayConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Int32ArrayConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Float32ArrayConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Float64ArrayConstructor because: Super reference | |
[enforcing Ignition and TurboFan for Uint8ClampedArrayConstructor because: Super reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
function re(strings, ...expressions) { | |
const pattern = expressions.reduce( | |
(acc, expr, i) => `${acc}${expr}${strings[i + 1]}`, strings[0] | |
); | |
return ([flags]) => new RegExp(pattern, flags); | |
} | |
console.log(re`^abc$``gu`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const fs = require('fs'); | |
const readline = require('readline'); | |
const files = []; | |
const [, , target = '.'] = process.argv; | |
if (fs.statSync(target).isDirectory()) { | |
files.push(...fs.readdirSync(target) | |
.map(file => `${target}/${file}`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const { writeFileSync } = require('fs'); | |
const LAST_CODE_POINT = 0x10FFFF; | |
const RegExps = [/./u, /^(?!.)/, /\w/u, /\W/u, /\d/u, /\D/u, /\s/u, /\S/u, /\b/u, /\B/u]; | |
let codePoint = 0; | |
let str; | |
let data = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: { | |
getCollaboratorsUsernames(); | |
function getCollaboratorsUsernames() { | |
const xhr = new XMLHttpRequest(); | |
xhr.open('GET', 'https://github.com/nodejs/node/blob/master/README.md', true); | |
xhr.responseType = 'document'; | |
xhr.withCredentials = true; | |
xhr.onload = markAuthorsLinks; | |
xhr.ontimeout = xhr.onerror = (evt) => { console.log(evt); }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
'use strict'; | |
/******************************************************************************/ | |
const cp = require('child_process'); | |
const fs = require('fs'); | |
const path = require('path'); | |
/******************************************************************************/ | |
const rootPath = 'j:/temp/node-master'; | |
const nodePath = `${rootPath}/Release/node.exe`; | |
const overPath = path.resolve(rootPath, '..'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
'use strict'; | |
/******************************************************************************/ | |
const [, , fpath] = process.argv; | |
if (!fpath) { | |
console.error('Add the file path, please.'); | |
process.exit(1); | |
} | |
/******************************************************************************/ | |
const fs = require('fs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Word = 'Word'; // In the beginning was the Word, | |
const God = { | |
get [Word]() { // and the Word was with God, | |
return this; // and the Word was God. | |
}, | |
}; | |
console.log(God.Word === God); // The same was in the beginning with God. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/******************************************************************************/ | |
'use strict'; | |
/******************************************************************************/ | |
const path = require('path'); | |
const fpath = process.argv[2] || ''; | |
const fext = path.extname(fpath); | |
if (!fpath || process.argv[3] || !['.gls', '.ifo'].includes(fext)) { | |
const scriptName = path.basename(__filename); |