I hereby claim:
- I am jshcrowthe on github.
- I am jshcrowthe (https://keybase.io/jshcrowthe) on keybase.
- I have a public key ASCKd2-KHXSwnLsJCrcw6nNvv9bC8s9_8bFAplynScOSlgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| function* chunkArray(dataset = [], offset = 5) { | |
| let start = 0; | |
| while (start < dataset.length) { | |
| const chunk = dataset.slice(start, start + offset); | |
| yield chunk; | |
| start += offset; | |
| } | |
| } |
| module.exports = { | |
| // ALL THE OTHER PROVIDERS ARE HERE | |
| applicationinsights(id, payload) { | |
| /** | |
| * This feels like it's in the right direction, IDK | |
| */ | |
| const ai = require('applicationinsights'); | |
| /** | |
| * I'm assuming that the tracking code is the instrumentationId, |
| <html> | |
| <head> | |
| <script src="/main.js"></script> | |
| </head> | |
| </html> |
| console.log('Loaded test-module via pkg.browser'); | |
| export function logModule() { | |
| console.log('`logModule` called in test-module'); | |
| } | |
| export function totallyUnused() { | |
| console.log('I go totally unused!'); | |
| } |
| ClientRect.prototype[Symbol.iterator] = function() { | |
| // ClientRect's properties apparently can't be discovered with Object.keys :( | |
| const obj = Object.assign({}, { | |
| top: this.top, | |
| right: this.right, | |
| bottom: this.bottom, | |
| left: this.left, | |
| height: this.height, | |
| width: this.width, | |
| }); |
| function debounce(fn, delay) { | |
| var timer = null; | |
| return function () { | |
| var context = this, args = arguments; | |
| clearTimeout(timer); | |
| timer = setTimeout(function () { | |
| fn.apply(context, args); | |
| }, delay); | |
| }; | |
| } |
| function throttle(fn, threshhold, scope) { | |
| threshhold || (threshhold = 250); | |
| var last, | |
| deferTimer; | |
| return function () { | |
| var context = scope || this; | |
| var now = +new Date, | |
| args = arguments; | |
| if (last && now < last + threshhold) { |
| String.prototype.hashCode = function() { | |
| var hash = 0; | |
| if (this.length == 0) return hash; | |
| for (i = 0; i < this.length; i++) { | |
| char = this.charCodeAt(i); | |
| hash = ((hash<<5)-hash)+char; | |
| hash = hash & hash; // Convert to 32bit integer | |
| } | |
| return hash; | |
| } |
| var webComponentsSupported = ('registerElement' in document | |
| && 'import' in document.createElement('link') | |
| && 'content' in document.createElement('template')); | |
| if (!webComponentsSupported) { | |
| var wcPoly = document.createElement('script'); | |
| wcPoly.src = '/bower_components/webcomponentsjs/webcomponents-lite.js'; | |
| wcPoly.async = true; | |
| (document.head || document.getElementsByTagName("head")[0]).appendChild(wcPoly); | |
| } |