Home

Awesome

yocto Build Status

yocto is fun, small (min.js ≈1K and min.js.gz ≈ 600B) and experimental library which allows you to chain all the default DOM Element methods and properties like this:

$$$('div')
    .style({background: 'red', color: '#fff'})
    .setAttribute('data-test', 2)
    .addEventListener('click', function(e) { console.log(e) })
    .lastElementChild()
        .className('last-child')
        .querySelectorAll('span')
            .style({color: '#0f0'})
            .innerHTML()

that's 137 items in the latest Google Chrome, for example.

console.dir($$$.prototype)

additional features

$$$('body') instanceof Array
// true

$$$ can:

cross-browser normalization

fuck it.

test & lint

license

WFTPL