0.1.0 • Published 6 years ago

shortify-js v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

shortify-js

You can write JavaScript objects shorter for browser.

Install

npm install --save shortify-js

Example

import s from 'shortify-js';

s.d.write('Hello'); // document.write('Hello');
s.l('Good'); // console.log('Good');

documentation

  • d - document
  • w - window
  • c - console
  • m - Math
  • id - document.getElementById()
  • class - document.getElementsByClassName()
  • tag - document.getElementsByTagName()
  • q - document.querySelector()
  • qa - document.querySelectorAll()
  • l - console.log()
  • iw - window.innerWidth
  • ih - window.innerHeight
  • ow - window.outerWidth
  • oh - window.outerHeight