Skip to content

Instantly share code, notes, and snippets.

@coreyfarrell
coreyfarrell / suppress-experimantal.js
Created December 5, 2019 13:24
suppress ExperimentalWarning
'use strict';
const {emitWarning} = process;
process.emitWarning = (warning, ...args) => {
if (args[0] === 'ExperimentalWarning') {
return;
}
if (typeof args[0] === 'object' && args[0].type === 'ExperimentalWarning') {
#!/usr/bin/env node
// Output of `nyc instrument --compact false test.js` with some minor whitespace tweaks for readability.
'use strict';
var cov_1t9w05ivrg = function () {
var path = "index.js",
hash = "1d887032f57e5b850e147fc91c3f2b4382c506bd",
Function = function () {}.constructor,
global = new Function('return this')(),
gcv = "__coverage__",
@coreyfarrell
coreyfarrell / npm-clone.sh
Created August 5, 2018 20:26
Script to clone by npm name
#!/bin/sh -e
npmname=$1
destination=/usr/src/npm/$npmname
if test -d $destination; then
echo "$npmname is already cloned into:"
echo " $destination"
exit 0
fi