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() { | |
var JSONP, Waveform, | |
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; | |
window.Waveform = Waveform = (function() { | |
Waveform.name = 'Waveform'; | |
function Waveform(options) { | |
this.redraw = __bind(this.redraw, this); |
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
module.exports=xmlToJSON;var xmlToJSON=function(){this.version="1.3";var e={mergeCDATA:!0,grokAttr:!0,grokText:!0,normalize:!0,xmlns:!0,namespaceKey:"_ns",textKey:"_text",valueKey:"_value",attrKey:"_attr",cdataKey:"_cdata",attrsAsObject:!0,stripAttrPrefix:!0,stripElemPrefix:!0,childrenAsArray:!0},t=new RegExp(/(?!xmlns)^.*:/),r=new RegExp(/^\s+|\s+$/g);return this.grokType=function(e){return/^\s*$/.test(e)?null:/^(?:true|false)$/i.test(e)?"true"===e.toLowerCase():isFinite(e)?parseFloat(e):e},this.parseString=function(e,t){return this.parseXML(this.stringToXML(e),t)},this.parseXML=function(a,n){for(var s in n)e[s]=n[s];var l={},i=0,o="";if(e.xmlns&&a.namespaceURI&&(l[e.namespaceKey]=a.namespaceURI),a.attributes&&a.attributes.length>0){var u={};for(i;i<a.attributes.length;i++){var c=a.attributes.item(i);m={};var p="";p=e.stripAttrPrefix?c.name.replace(t,""):c.name,m[e.valueKey]=e.grokAttr?this.grokType(c.value.replace(r,"")):c.value.replace(r,""),e.xmlns&&c.namespaceURI&&(m[e.namespaceKey]=c.namespaceURI),e.att |
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
// Less | |
@navy: #001f3f; | |
@blue: #0074d9; | |
@aqua: #7fdbff; | |
@teal: #39cccc; | |
@olive: #3d9970; | |
@green: #2ecc40; | |
@lime: #01ff70; | |
@yellow: #ffdc00; | |
@orange: #ff851b; |
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
// Inspired from a package I think is called ts-attempt but can't find it anymore. | |
const failSymbol = Symbol('fail') | |
type Ok<T> = T | |
type Fail = { [failSymbol]: true; error: unknown } | |
type Result<T> = Ok<T> | Fail | |
export async function attempt<T>(fn: () => Promise<T>): Promise<Result<T>> { |
OlderNewer