You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Evan M Jones 6ca968cc47
Fix(README.md): typo.
3 years ago
src Feat(*): Remove Google Closure Compiler. Minimize by hand. Fun! 3 years ago
test Feat(Chainable): 'createElement('div').chain(el=>{/* I'm a div. */).chain(console.log)' for easier interopability with other libs. 3 years ago
.gitignore Feat(*): Remove Google Closure Compiler. Minimize by hand. Fun! 3 years ago
.npmignore Feat(*): Remove Google Closure Compiler. Minimize by hand. Fun! 3 years ago
LICENSE.md Feat(*): Project init. 3 years ago
README.md Fix(README.md): typo. 3 years ago
package-lock.json Feat(*): Remove Google Closure Compiler. Minimize by hand. Fun! 3 years ago
package.json Feat(*): Remove Google Closure Compiler. Minimize by hand. Fun! 3 years ago

README.md

OGLE-TR-122b

OGLE-TR-122b is the smallest star know to man.

OGLE-TR-122b the NPM library is a small abstraction over the DOM's APIs for creating elements. It's a fun, hand minimized experiment. Final build clocks in at 259 bytes of gzip'd ECMAScript 5.

Example

import createElement from "ogle-tr-122b";

document.body.appendChild(
  createElement("div")
    .setAttribute("class", "container")
    .appendChild(
      createElement("h1")
        .setAttribute("class", "title")
        .setTextContent("Please enter name:")
    )
    .appendChild(
      createElement("input")
        .setAttribute("placeholder", "name")
        .setAttribute("autofocus", true)
        .addEventListener("input", event => {
          let { previousSibling, value } = event.target;
          previousSibling.textContent = `Name: ${value}`;
        })
    )
);