Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pell.js even smaller in size #91

Open
jaredreich opened this issue Mar 12, 2018 · 3 comments
Open

Make pell.js even smaller in size #91

jaredreich opened this issue Mar 12, 2018 · 3 comments
Milestone

Comments

@jaredreich
Copy link
Owner

Please post suggestions here if you have any, thanks!

@bcolucci
Copy link

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 :)

@bcolucci
Copy link

#108
Save about 13%

@sylvainpolletvillard
Copy link

I made several optimizations in my fork, you might be interested: https://github.com/sylvainpolletvillard/spell/blob/master/spell.js

@jaredreich jaredreich added this to the 2.0 milestone Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants