Uses ES2015 Proxy to spy on selector property accesses and returns an object describing the expected state tree
Does not work with IE, even with proxy-polyfill
Given a set of basic selectors
Uses ES2015 Proxy to spy on selector property accesses and returns an object describing the expected state tree
Does not work with IE, even with proxy-polyfill
Given a set of basic selectors
var camelized = String(inputString).split(/\s+/).reduce(function(p, c, idx) { | |
return (idx > 0) ? p + c.charAt(0).toUpperCase() + c.slice(1): p + c.charAt(0).toLowerCase() + c.slice(1); | |
}, ''); |
var path = require('path'); | |
var through = require('through2'); | |
var gutil = require('gulp-util'); | |
module.exports = function beautifyData() { | |
// creating a stream through which each file will pass | |
var stream = through.obj(function(file, enc, cb) { |
Waveform specs | |
---|---|
Tone frequency | 400Hz |
Sample rate | 8000Hz |
Duration | 50ms |
##WAV## data:audio/wav;base64,UklGRlIBAABXQVZFZm10IBIAAAABAAEAcBcAAHAXAAABAAgAAABkYXRhLAEAAICGjI+QjYqDfXZycHB0eYCGjJCQjYqEfXdzb3F0eYCHjI6Pj4mEfXdycHF0eYCGi4+QjYqEfXZycHF0eYCHi4+QjYqEfXZycHF0eYCHjI+RjoqDfHdycXJ0eYCGjJCRjomDfXZycXF0eoGGjI+QjomDfXdycHF0eoCGjI+QjYqDfXdzcHF0eoCGi4+QjomDfXdycHB0eYCHjI6RjomCfHZycHB0eoCGi4+Qj4mEfHZxb3F0eYCGi4+QjoqDfXdycHJ0eYCGjJCRjoqDfXZycXF0eYCGjI+PjoqDfXdxcHF0eYCHjI+QjomDfHZycHF0eoCHjJCPjoqDfXZycXF1eYCGjI+PjoqEfHZycHF0eYGGi5CRjoqDfHdycHF0eYCGjJCQjYqEfXZycHFzeQ==
Hear these samples in action (actually, they're all silent)
data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA
data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA/+M4wAAAAAAAAAAAAEluZm8AAAAPAAAAAwAAAbAAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV1dXV////////////////////////////////////////////AAAAAExhdmM1OC4xMwAAAAAAAAAAAAAAACQDkAAAAAAAAAGw9wrNaQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/+MYxAAAAANIAAAAAExBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDsAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxHYAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAyzN3NAAAAAGFf2X8BM39GTEFDAQAAAWZMYUMAAAAiEgASAAAAAAAkFQrEQPAAAAAAAAAAAAAAAAAAAAAAAAAAAE9nZ1MAAAAAAAAAA
/** | |
* Adapted from gist by josedaniel | |
* https://gist.github.com/1001363 | |
*/ | |
if (!window.localStorage){ | |
function createCookie(name,value,days) { | |
if (days) { | |
var date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
var expires = "; expires="+date.toGMTString(); |