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

Remove "var/const/let myObject = " and ";" at end of object #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trymeouteh
Copy link

Lets say this is your JS object...

const myObject = {
   "myPropertyA": "myValue",
   "myPropertyB": "myValue"
};

The JS object minified will be...

constmyObject={"myPropertyA":"myValue","myPropertyB":"myValue"};

When I use this package, it does not remove the "constmyObject=" or the ";" line break at the end of the object.

This improvement will parse the final output string to remove keywords such as const. let, and var, remove variable names and equal operators before the object brackets {. This improvement will remove any semicolons the come after the object. And this improvement will remove any characters that come before and after the object in the final parsed string.

This will solve this issue I made earlier this year.
#20

Remove "var/const/let myObject = " and ";" at end of object.
ovidigital#20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant