pell
pell copied to clipboard
Make pell.js even smaller in size
Please post suggestions here if you have any, thanks!
Something fast and easy...
Shortcuts like:
const addEventListener = (parent, type, listener) => parent.addEventListener(type, listener)
const appendChild = (parent, child) => parent.appendChild(child)
const createElement = tag => document.createElement(tag)
const queryCommandState = command => document.queryCommandState(command)
const queryCommandValue = command => document.queryCommandValue(command)
export const exec = (command, value = null) => document.execCommand(command, false, value)
could be removed :)
https://github.com/jaredreich/pell/pull/108 Save about 13%
I made several optimizations in my fork, you might be interested: https://github.com/sylvainpolletvillard/spell/blob/master/spell.js