Skip to content

Instantly share code, notes, and snippets.

View subversivo58's full-sized avatar
📧
For critical issues, send me an email

Lauro Moraes subversivo58

📧
For critical issues, send me an email
View GitHub Profile
@subversivo58
subversivo58 / custom-error.js
Created June 23, 2019 17:16 — forked from justmoon/custom-error.js
Creating custom Error classes in Node.js
'use strict';
module.exports = function CustomError(message, extra) {
Error.captureStackTrace(this, this.constructor);
this.name = this.constructor.name;
this.message = message;
this.extra = extra;
};
require('util').inherits(module.exports, Error);
@subversivo58
subversivo58 / pako_inflate.min.mjs
Last active January 31, 2021 19:10
pako inflate 1.0.10 - ES6 module
/**
* @license ZLIB
* @copyright Copyright (c) 1995-2013 Jean-loup Gailly and Mark Adler {@link http://zlib.net}
* @license The MIT License (MIT)
* @copyright Copyright (c) 2014-2017 Vitaly Puzrin and Andrei Tuputcyn {@link https://github.com/nodeca/pako/tree/master/lib/zlib}
* @copyright Copyright (c) 2019-2021 Lauro Moraes {@link https://github.com/subversivo58}
* @see https://github.com/nodeca/pako
*/let pako;!function(a){pako=a()}(function(){return function b(c,e,g){function d(h,i){if(!e[h]){if(!c[h]){var j="function"==typeof require&&require;if(!i&&j)return j(h,!0);if(a)return a(h,!0);var f=new Error("Cannot find module '"+h+"'");throw f.code="MODULE_NOT_FOUND",f}var k=e[h]={exports:{}};c[h][0].call(k.exports,function(a){var b=c[h][1][a];return d(b||a)},k,k.exports,b,c,e,g)}return e[h].exports}for(var a="function"==typeof require&&require,f=0;f<g.length;f++)d(g[f]);return d}({1:[function(b,c,d){"use strict";function f(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var e="undefined"!=typeof