View fileInput.css
.fileContainer {
overflow: hidden;
position: relative;
}
.fileContainer [type=file] {
cursor: inherit;
display: block;
font-size: 999px;
filter: alpha(opacity=0);
View README.md

jquery.scrollLock.js

Useful for when a blocking user experience is needed (in my case, didn't want people unwittingly loosing their place by scrolling while a modal required their attention): $.scrollLock() locks the body in place, preventing scroll until it is unlocked.

// Locks the page if it's currently unlocked
$.scrollLock();

// ...or vice versa
View detectCSS.js
// Is the passed CSS property supported?
// eg. detectCSS('transition')
function detectCSS(prop){
var
prop = prop.replace(/-(\w)/g,function(s,g){return g.toUpperCase()}),
pre = ',Icab,Khtml,Moz,Ms,O,Webkit'.split(',');
for (var i = 0; i < pre.length; ++i){
if(i==1)
prop = prop.slice(0,1).toUpperCase() + prop.slice(1);
View m.Portal.js
const Portal = {
view : ({attrs, content = []}) =>
attrs.view({
outlet: () =>
content,
inlet: (...input) => {
content.splice(0, Infinity, ...input)
},
})
View component_shouldUpdate.js
import remember from 'funes'
const retainer = { subtree : 'retain' }
export default remember.bind(
component => {
return 'shouldUpdate' in component
? {
...component,
view : ( ...args ) =>
View serialized-model-logic.js
const endOfTime = '9999-12-31'
const conditions = [
{
demographic: {
gender: 'female',
dob: '1954-10-06',
},
retirement: {
View cssVars.js
const cssVars = (target = document.documentElement, key, value) => (
key == null
? [...target.style].reduce((hash, key) => hash.slice(0,2) != '--' ? hash : Object.assign(hash, {
[key.slice(2)] : target.style.getPropertyValue(key)
}), {})
: typeof key == 'object'
? Object.entries(key).forEach(entry => {
cssVars(target, ...entry)
})
: value == undefined
View occluder.js
function occluder(){
var fresh = true;
var item = 40;
var offset = 0;
var scroller = window;
var viewport = 0;
return {
scroller : function scrollerConfig( el, init, context ){
if( arguments.length < 2 || !init || fresh ){
View weil.js
export default iterator =>
function * (cursor) {
while(cursor = iterator(cursor))
cursor = yield(cursor)
}
}
View patchinko.js
export {patch, scope}
function patch(a, b){
for(var key in b)
if(b.hasOwnProperty(key))
a[key] = (
b[key] instanceof scope
? scope.apply(a[key])
: b[key]
)