Skip to content

Instantly share code, notes, and snippets.

@stbaer
stbaer / camelcase.es6.js
Created April 30, 2018 06:33
camelcase
export default str => str
.replace(/^[_.\- ]+/, '')
.toLowerCase()
.replace(/[_.\- ]+(\w|$)/g, (m, p1) => p1.toUpperCase())
@stbaer
stbaer / hint.delay.css
Created June 16, 2015 11:02
hint.css timeouts
// show after 500ms, hide after 1000ms
hint--timeout:before, .hint--timeout:after {
-webkit-transition-delay: 1000ms;
-moz-transition-delay: 1000ms;
transition-delay: 1000ms;
}
.hint--timeout:hover:before, .hint--timeout:hover:after {
-webkit-transition-delay: 500ms;
-moz-transition-delay: 500ms;
@stbaer
stbaer / tinytest.api
Last active November 15, 2016 19:10
Meteor tinytest api
test.isFalse(v, msg)
test.isTrue(v, msg)
test.equal(actual, expected, message, not)
test.length(obj, len)
test.include(s, v)
test.isNaN(v, msg)
test.isUndefined(v, msg)
test.isNotNull
test.isNull
test.throws(func)