This file contains hidden or 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 generateStylesheet(it) { | |
const rules = new Map | |
const selectors = new Map | |
for (const node of nodes(it)) { | |
for (const [property, value] of getStyles(node)) { | |
if (!rules.has(property)) { | |
rules.set(property, new Map) | |
} |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<title>greent</title> | |
<style> | |
form { | |
font-family: Tahoma; | |
} | |
form > label, | |
form > input { |
This file contains hidden or 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 parseSloppyJson(it) { | |
const [object, size] = parseJSON2(it, 0) | |
return object | |
function parseJSON2(source, previousLength = 0) { | |
const getValue = parseJSON2 | |
let that; |
This file contains hidden or 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 querystring = require('querystring') | |
const crypto = require('crypto') | |
const zlib = require('zlib') | |
const path = require('path') | |
const http = require('http') | |
const vm = require('vm') | |
const net = require('net') | |
const url = require('url') | |
const fs = require('fs') | |
const perf_hooks = require('perf_hooks') |
This file contains hidden or 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 pipe = <T, K>( | |
iterable: IterableIterator<T>, | |
seed: K, | |
fn: (a: T) => K | |
): T => { | |
const iterator: IterableIterator<T> = iterable[Symbol.iterator]() | |
if (iterable instanceof GeneratorFunction) { | |
iterator.next() | |
} |
This file contains hidden or 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
import { PathLike, Stats } from "fs"; | |
import * as querystring from 'querystring' | |
import * as crypto from 'crypto' | |
import * as zlib from 'zlib' | |
import * as path from 'path' | |
import * as http from 'http' | |
import * as vm from 'vm' | |
import * as net from 'net' | |
import * as url from 'url' |
This file contains hidden or 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 querystring = require('querystring') | |
const crypto = require('crypto') | |
const zlib = require('zlib') | |
const path = require('path') | |
const http = require('http') | |
const vm = require('vm') | |
const net = require('net') | |
const url = require('url') | |
const fs = require('fs') | |
const perf_hooks = require('perf_hooks') |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<title></title> | |
<script> | |
const $2PI = 2 * Math.PI | |
const scale = [ | |
[ |
This file contains hidden or 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 generateStylesheet(it) { | |
const rules = new Map | |
const selectors = new Map | |
for (const node of nodes(it)) { | |
for (const [property, value] of getStyles(node)) { | |
if (!rules.has(property)) { | |
rules.set(property, new Map) | |
} |
This file contains hidden or 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
/** | |
* Intended as a plugin for upend, but is useful without it. | |
* | |
* @summary Standardized Typescript compiler. | |
* | |
* @async | |
* @function plugin_typescript | |
* | |
* @param {string | object} it - Typescript source to be compiled. |