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
function trunkSize (n) { | |
return Math.floor(n / 3) | |
} | |
function drawTopOfTree (chars, n) { | |
const width = (n - 1) * 2 + 1 | |
let currentPos = 0 | |
return new Array(n).fill(0).map((_, index) => { | |
const placeholders = new Array(index + 1).fill('x').join(' ') | |
const spaceLeft = width - placeholders.length |
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 { createWriteStream, mkdir } = require('fs') | |
const { dirname, join } = require('path') | |
const { capture, log, serve } = require('..') | |
const mkdirAsync = require('util').promisify(mkdir) | |
const cacheBasePath = join(__dirname, 'cache') | |
// Should wait for completion | |
mkdirAsync(cacheBasePath, { recursive: true }) |
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 { createWriteStream, mkdir } = require('fs') | |
const { dirname, join } = require('path') | |
const { capture, log, serve } = require('..') | |
const mkdirAsync = require('util').promisify(mkdir) | |
const cacheBasePath = join(__dirname, 'cache') | |
// Should wait for completion | |
mkdirAsync(cacheBasePath, { recursive: true }) |
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 { createWriteStream, mkdir } = require('fs') | |
const { dirname, join } = require('path') | |
const { capture, log, serve } = require('..') | |
const mkdirAsync = require('util').promisify(mkdir) | |
const cacheBasePath = join(__dirname, 'cache') | |
// Should wait for completion | |
mkdirAsync(cacheBasePath, { recursive: true }) |
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 { log, serve } = require('reserve') | |
log(serve({ | |
port: 8005, | |
mappings: [{ | |
match: /^\/(.*)/, | |
url: 'http://facetheforce.today/$1' | |
}] | |
}), process.argv.includes('--verbose')) |
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
Uncaught ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor |
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
TypeError: Class constructor A cannot be invoked without 'new' |
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 gpf = require("gpf-js"); | |
class A { | |
constructor () { | |
this._a = "A"; | |
} | |
} | |
const B = gpf.define({ | |
$class: "B", |
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
let caseSensitive = true | |
function getEntry (entryPath) { | |
if (!caseSensitive) { | |
entryPath = entryPath.toLowerCase() | |
} | |
if (entryPath === '/') { | |
return entries | |
} | |
return entryPath.split(path.sep).slice(1).reduce((folder, name) => { |
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
{ | |
"extend": "./mappings.json", | |
"port": 5000 | |
} |
NewerOlder