Data models contain the entirety of application state (from the elm-lang guide - "The point of the model is to capture all the details about your application as data." )
A model could be as simple as a plain javascript object
// an alternative to traversal | |
// https://github.com/matthewstokeley/dom-traversal | |
// @version 0.0.3 | |
_.castArr = function( | |
list: NodeList | |
): Array { | |
return Array.prototype.splice.call( list ) | |
} |
https://docs.google.com/document/d/1-gw6591eW5WZLy6PU4EcUDfOIlFSi4iiZJVkqhoLpV0/edit?usp=sharing |
/*> Click Handler Middleware */ | |
// @version 0.0.3 | |
// CHANGELOG | |
// 0.0.3 add type scaffolding | |
type Next = function():void {} | |
interface Target { |
// quick sketch | |
/** | |
* Contextual piping | |
* @todo create a method to mimic a piping operator | |
*/ | |
const pipe = function() { | |
let res | |
for ( let i = 0; i < this.length; i++ ) { |
Created in conjunction with this landing page google integration road map https://docs.google.com/document/d/1YXartxy_Qv9cKMqlKrIlyfC5IeNyuDnZQRp5_XtezC8/edit?usp=sharing
and a mood board - a look and feel guide for landing pages https://app.milanote.com/1J5RhI1CpFX49G
mood board easter eggs
// immutable, unique symbols are used for keys. | |
let key = new Symbol("md5") | |
const hashTable = { | |
[key] : {} | |
} |
// an object mutator for a functional, compositional event-based data mapper with closures | |
const store = {} | |
const shallowCloneObject = store => Object.assign({}, store) | |
// const store = shallowCloneObject(original)l | |
function defineProperty ( | |
object: Object, |
/**
* ht vue, lo
* Cache a function
*/
function cached (
fn: Function,
resolver: Function
): Function {