{"id":19826879,"url":"https://github.com/estools/esshorten","last_synced_at":"2025-05-01T14:31:45.860Z","repository":{"id":57230576,"uuid":"11880942","full_name":"estools/esshorten","owner":"estools","description":"Shorten (mangle) names in JavaScript code","archived":false,"fork":false,"pushed_at":"2018-11-15T07:06:06.000Z","size":38,"stargazers_count":20,"open_issues_count":4,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-21T05:07:26.705Z","etag":null,"topics":["ast","ecmascript","estree","javascript"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/estools.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-04T15:53:39.000Z","updated_at":"2024-02-02T21:12:09.000Z","dependencies_parsed_at":"2022-09-01T21:02:06.550Z","dependency_job_id":null,"html_url":"https://github.com/estools/esshorten","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesshorten","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesshorten/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesshorten/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estools%2Fesshorten/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/estools","download_url":"https://codeload.github.com/estools/esshorten/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251890098,"owners_count":21660446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","ecmascript","estree","javascript"],"created_at":"2024-11-12T11:11:53.063Z","updated_at":"2025-05-01T14:31:45.532Z","avatar_url":"https://github.com/estools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### esshorten\n\nesshorten provides name mangler, this shorten names in JavaScript code. mangler accepts JavaScript AST and generate modified AST with shortened names.\n\n### usage\n\nWe can use this with,\n\n```js\nesshorten.mangle(AST);\n```\n\nAnd we can pass options to mangler,\n\n```js\nesshorten.mangle(AST, {\n    // If false, AST is copied deeply (default: true)\n    destructive: false,\n    // If false, avoid [JSC bug](https://github.com/mozilla/sweet.js/issues/138) (default: false)\n    distinguishFunctionExpressionScope: false\n});\n```\n\nWhen destructive option is set to false, esshorten copies AST and modifies it.\n\n### license\n\nCopyright (C) 2013 [Yusuke Suzuki](http://github.com/Constellation)\n (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n\n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the\n    documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL \u003cCOPYRIGHT HOLDER\u003e BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festools%2Fesshorten","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Festools%2Fesshorten","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festools%2Fesshorten/lists"}