npm install --save-dev gist:8ce270954c48a4092b5dc62a0866792e
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
Trompi'en | |
Han hette Anders Olsson och bebodde torpet Gräsmyren på | |
Skybergsskogen i Älgå, vilket efter honom även benämndes | |
Trumpinntorpet. Man vet inte, när han föddes, men som jag i | |
annat sammanhang har omtalat, skrev han några visor i anledning av en drunkningsolycka på Glavsfjorden år 1817 (se s. II 188) | |
och bör således vara född omkring 1780. Det antages av mina | |
sagesmän, att han avled omkring 1840. | |
Sägnerna om denne trollkarl är många. En del av dem återges |
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
Odla för husbehov o försäljning | |
Vilken är min jordmån? | |
Vem är jag som odlare? | |
Mätt på en plätt | |
346 kg | |
Lex! bladgrönt) mat |
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 imageLoad(imageUrl) { | |
return new Promise((resolve, reject) => { | |
const image = new Image(); | |
image.crossOrigin = 'anonymous'; | |
image.onload = () => resolve(image); | |
image.onerror = err => reject(err); | |
image.src = imageUrl; | |
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
export default class TidalWebComponent extends HTMLElement { | |
static css (strings) { | |
const text = strings.raw.join(); | |
const sheet = new CSSStyleSheet(); | |
sheet.replace(text); | |
return sheet; | |
} | |
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
/** | |
* Converts a snake-case string to camelCase | |
* | |
* @param {string} str kebab-cased string | |
* @returns {string} camelCased string | |
*/ | |
export function kebabToCamelCase(str) { | |
return str.replace(/(-)([a-z])/g, g => g[1].toUpperCase()); | |
} |
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
class TemplateStore { | |
constructor (node) { | |
if (!(node instanceof HTMLElement)) { | |
throw new Error('DOM Node for template storage is not set up. Please pass in an HTMLElement to the constructor.'); | |
} | |
this.parentDOMNode = node; | |
} | |
/** |
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
'use latest'; | |
import express from 'express'; | |
import request from 'request'; | |
import { fromExpress } from 'webtask-tools'; | |
import bodyParser from 'body-parser'; | |
const app = express(); | |
app.use(bodyParser.json()); |