Skip to content

Instantly share code, notes, and snippets.

/*
ericasadun.com
Sometimes letting go doesn't mean saying goodbye
*/
prefix operator ++
prefix operator --
postfix operator ++
@jonathansampson
jonathansampson / valueAsNumber.js
Created August 4, 2014 15:48
`valueAsNumber` shim for Internet Explorer 11
(function () {
/* Internet Explorer 11 may have trouble retrieving the number type
of an input value. This short script performs a quick test, and repairs
the functionality if necessary. Load before attempting to use the
`valueAsNumber` property on input elements. */
"use strict";
var a = document.createElement( "input" );
@hyle
hyle / ko.utils.3.1.0.signatures.js
Created March 5, 2014 08:30
KnockoutJS 3.1.0 utils (ko.utils) signatures
ko.utils.addOrRemoveItem = function (array, value, included) { /* .. */ }
ko.utils.anyDomNodeIsAttachedToDocument = function (nodes) { /* .. */ }
ko.utils.arrayFilter = function (array, predicate) { /* .. */ }
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ }
ko.utils.arrayForEach = function (array, action) { /* .. */ }