[Harmony] - prefix for mangle property names#1472
Closed
dabretin wants to merge 3 commits into
Closed
Conversation
Pass the value || "" to method mangle_properties via option
Contributor
|
Tests pls
Op wo 8 feb. 2017 10:01 schreef David BRETIN <notifications@github.com>:
… It could be very useful to set profix of mangle names.
It could permit to restrict access (at runtime) to "private"
properties/methods on proxified objects.
------------------------------
You can view, comment on, or merge this pull request online at:
#1472
Commit Summary
- Add "mangle-prefix" arguments
- Add prefix for mangle name properties
- Update propmangle.js
File Changes
- *M* bin/uglifyjs
<https://github.com/mishoo/UglifyJS2/pull/1472/files#diff-0> (3)
- *M* lib/propmangle.js
<https://github.com/mishoo/UglifyJS2/pull/1472/files#diff-1> (2)
Patch Links:
- https://github.com/mishoo/UglifyJS2/pull/1472.patch
- https://github.com/mishoo/UglifyJS2/pull/1472.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1472>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAM9GKPXmJ4l0wsFhMfSmlMES5rJf2cVks5raYSGgaJpZM4L6i2E>
.
|
Author
|
Example: class Test
{
__privateMethod()
{
console.log("This is private");
}
publicMethod()
{
console.log("This is public");
}
}Uglify with class Test{__a(){console.log("This is private")}publicMethod(){console.log("This is public")}}Now for remote access (RPC in my case) it will be soo easy to restrict access on public methods (wich not starts with "__"). |
Contributor
|
The option should be added here too: https://github.com/mishoo/UglifyJS2/pull/1472/files#diff-7d9849d6584d8e1e4c321aca78e0977aR87 |
Author
|
Ah...ok :) |
Contributor
|
This PR would break Need CLI and |
Author
|
Close for #1475 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It could be very useful to set profix of mangle names.
It could permit to restrict access (at runtime) to "private" properties/methods on proxified objects.