I hereby claim:
- I am jollytoad on github.
- I am jollytoad (https://keybase.io/jollytoad) on keybase.
- I have a public key ASBNy3nSrQbjlDYfZFrXj0ecD8mnqT3_mPQlYjg6II3nKgo
To claim this, I am signing this object:
import { walk } from "jsr:@std/fs@^0.221.0/walk"; | |
export async function fixStdLibImports(root: string) { | |
for await (const entry of walk(root, { exts: [".ts"] })) { | |
const content = await Deno.readTextFile(entry.path); | |
const replaced = content.replaceAll(/"@std\/([^"]+)"/g, (str) => { | |
return str.replaceAll("_", "-"); | |
}); |
/** | |
* Parse a stream of HTML into Elements. | |
* | |
* Only emits child elements of the body once the parser moves | |
* onto the next child element. All head elements are ignored, | |
* as are non-element child nodes of the body (eg. comments, character data). | |
* | |
* The stream can be a series of individual HTML elements, not necessarily | |
* enclosed within `<html>`/`<body>` tags, but proceeded by `<!DOCTYPE html>`, | |
* and this would be a perfectly valid HTML5 document (as far as the parser |
/** | |
* @template T | |
* @this {ReadableStream<T>} | |
*/ | |
async function* readableStreamIterator() { | |
const reader = this.getReader(); | |
try { | |
let done, value; | |
do { | |
({ done, value } = await reader.read()); |
import * as Blockly from "./blockly"; | |
/** | |
* This would be an interface exposed at Blockly.Plugins | |
*/ | |
interface Plugins { | |
/** | |
* Register a new plugin with Blockly | |
* @param factory a function that returns a PluginSpec. | |
*/ |
/** | |
* Check whether the given variable type is allowed on this field. | |
* @param {string|Array<string>} type The type (or types) to check. | |
* @return {boolean} True if the type (or one of the types) is in the list of allowed types. | |
* @private | |
*/ | |
Blockly.FieldVariable.prototype.typeIsAllowed_ = function (type) { | |
var typeList = this.getVariableTypes_() | |
if (!typeList) { | |
return true // If it's null, all types are valid. |
import h from 'virtual-dom/h' | |
export default function(tag, props, ...children) { | |
if (typeof tag === 'function') { | |
return tag(props, ...children) | |
} else { | |
return h(tag, transformProps(props), children) | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
function readFile(file) { | |
var reader = new FileReader(); | |
var deferred = $.Deferred(); | |
reader.onload = function(event) { | |
deferred.resolve(event.target.result); | |
}; | |
reader.onerror = function() { | |
deferred.reject(this); |
function parseDataUri(uri) { | |
var m = /^data:([^;,/]+\/[^;,/]+)?(;charset=([^;,]+))?(;base64)?,(.*)$/.exec(uri); | |
return m && { | |
type: m[1] || "text/plain", | |
charset: m[3], | |
base64: !!m[4], | |
data: m[5] | |
}; | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Photos</title> | |
<style> | |
html, body { padding: 0; margin: 0; background-color: black; color: white; width: 100%; height: 100%; } | |
#photo { background-repeat: no-repeat; background-position: center; background-size: auto 100%; width: 100%; height: 100%; } | |
#msg { position: fixed; bottom: 0; right: 0; text-align: right; color: white; font-size: 10px } | |
</style> | |
</head> |