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
// Create an element with attributes, and optionally append children to it | |
// Public Domain licensed, if you're interested. | |
function e( | |
elm: string, | |
attrs: Record<string, string> = {}, | |
...children: (string | Node)[] | |
): Node { | |
// Create element and add relevant attributes | |
const elem = document.createElement(elm); | |
for (const [k, v] of Object.entries(attrs)) { |
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 getExt(filename, opts) { | |
if (!opts) opts = {}; | |
if (!filename) return ""; | |
var ext = (/[^./\\]*$/.exec(filename) || [""])[0]; | |
return opts.preserveCase ? ext : ext.toLowerCase(); | |
}; | |
async function typeMap () { | |
const db = await fetch('https://unpkg.com/mime-db/db.json').then(t => t.json()); |
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
import { validate, IsInt, IsEmail, IsIn, IsNotEmpty } from 'class-validator'; | |
import { Provider } from './provider'; | |
export class InstanceConfig { | |
[key:string]: number | string; | |
@IsEmail() | |
@IsNotEmpty() | |
email: string; |
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 () { | |
'use strict'; | |
var detect = function detect(property, value) { | |
if (window.CSS && window.CSS.supports) { | |
return window.CSS.supports(property, value); | |
} | |
else { | |
return false; | |
} |
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
<div id="container"> | |
<div class="first">First</div> | |
<div class="second">Second</div> | |
<div class="third">Third</div> | |
<div class="fourth">Fourth</div> | |
</div> |
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
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@import "breakpoint"; | |
@import "toolkit"; | |
@import "singularitygs"; | |
@include sgs-change('debug', true); | |
@include sgs-change('mobile first', 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
<div class="grid-4"> | |
<h3>Item 1</h3> | |
</div> | |
<div class="grid-4"> | |
<h3>Item 2</h3> | |
</div> | |
<div class="grid-4"> | |
<h3>Item 3</h3> | |
</div> | |
<div class="grid-4"> |
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
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// ---- | |
$a: 'test'; | |
$b: test; | |
.foo { | |
content: is-quoted($a); // true | |
content: is-quoted($b); // false |
NewerOlder