René's URL Explorer Experiment


Title: Object destructuring assignment does not work for variables initialized previously · Issue #361 · javascript-obfuscator/javascript-obfuscator · GitHub

Open Graph Title: Object destructuring assignment does not work for variables initialized previously · Issue #361 · javascript-obfuscator/javascript-obfuscator

X Title: Object destructuring assignment does not work for variables initialized previously · Issue #361 · javascript-obfuscator/javascript-obfuscator

Description: Expected Behavior Variable assignment without declaration when using object destructuring should work. According to destructuring assignment in MDN {a, b} = {a: 1, b: 2} is not valid stand-alone syntax, as the {a, b} on the left-hand sid...

Open Graph Description: Expected Behavior Variable assignment without declaration when using object destructuring should work. According to destructuring assignment in MDN {a, b} = {a: 1, b: 2} is not valid stand-alone sy...

X Description: Expected Behavior Variable assignment without declaration when using object destructuring should work. According to destructuring assignment in MDN {a, b} = {a: 1, b: 2} is not valid stand-alone sy...

Opengraph URL: https://github.com/javascript-obfuscator/javascript-obfuscator/issues/361

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Object destructuring assignment does not work for variables initialized previously","articleBody":"\u003c!-- Love javascript-obfuscator? Please consider supporting our collective:\r\n👉  https://opencollective.com/javascript-obfuscator/donate --\u003e\r\n\r\n\u003c!--- Provide a general summary of the issue in the Title above --\u003e\r\n\r\n## Expected Behavior\r\nVariable assignment without declaration when using object destructuring should work.\r\n\r\nAccording to [destructuring assignment in MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring)\r\n\r\n\u003e {a, b} = {a: 1, b: 2} is not valid stand-alone syntax, as the {a, b} on the left-hand side is considered a block and not an object literal.\r\n\u003e \r\n\u003e However, ({a, b} = {a: 1, b: 2}) is valid, as is var {a, b} = {a: 1, b: 2}\r\n\r\n\u003c!--- If you're describing a bug, tell us what should happen --\u003e\r\n\u003c!--- If you're suggesting a change/improvement, tell us how it should work --\u003e\r\n\r\n## Current Behavior\r\nCurrently the variable name on left-hand side part of the statement is not being changed by the obfuscator while the initial variable declaration is.\r\n\r\nThis is the obfuscator output for the function below:\r\n```\r\nfunctiontest(_0x4bb6ab){\r\n\tlet_0x44c2ed=undefined;if(!![]){\r\n\t\t({\r\n\t\t\ta // \u003c- notice how a is not obfuscated\r\n\t\t}=_0x4bb6ab);\r\n\t}console[_0x1b95('0x0')](_0x44c2ed);\r\n}\r\n```\r\n\u003c!--- If describing a bug, tell us what happens instead of the expected behavior --\u003e\r\n\u003c!--- If suggesting a change/improvement, explain the difference from current behavior --\u003e\r\n\r\n## Steps to Reproduce (for bugs)\r\n\u003c!--- Provide a link to a live example, or an unambiguous set of steps to --\u003e\r\n\u003c!--- reproduce this bug. Include code to reproduce, if relevant --\u003e\r\n1. Simply run the obfuscator for the code example given below\r\n2.\r\n3.\r\n4.\r\n\r\n## Your Environment\r\n\u003c!--- Include as many relevant details about the environment you experienced the bug in --\u003e\r\n* Obfuscator version used: 0.18.1\r\n* Node version used: 8.2.1 (although it does matter)\r\n\r\n# Stack trace\r\n\u003c!--- Include stack trace --\u003e\r\n\r\n## Minimal working example that will help to reproduce issue\r\n\u003c!--- Include code --\u003e\r\n```\r\nfunction test(obj) {\r\n    let a = undefined;\r\n    if(true){\r\n        ({a} = obj);\r\n    }\r\n    console.log(a);\r\n    // this should print 1, running the same example after the obfuscation prints undefined\r\n}\r\n\r\ntest({a: 1});\r\n```\r\n","author":{"url":"https://github.com/skiritsis","@type":"Person","name":"skiritsis"},"datePublished":"2018-12-13T12:00:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/361/javascript-obfuscator/issues/361"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7b0aa814-2d0e-aad7-2afc-a6e8de88dd4a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB448:35EC8D:BE635E:1025366:6A62F52D
html-safe-nonce7f0aa5415ada064077e5ca3ee1e8b68bfd331b26ff45c538d74f67ba953e7bc5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDQ4OjM1RUM4RDpCRTYzNUU6MTAyNTM2Njo2QTYyRjUyRCIsInZpc2l0b3JfaWQiOiIyMjEzMDc2NzQ5OTkwNTk3NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacadeadfd67fbed48aec9d556639321de244d7e573013332c6847a0e356287349d
hovercard-subject-tagissue:390647041
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javascript-obfuscator/javascript-obfuscator/361/issue_layout
twitter:imagehttps://opengraph.githubassets.com/94aa517f6030d0090a43ae4bf9307b2449dbe78f0a8c6cd726ede03e575d3cac/javascript-obfuscator/javascript-obfuscator/issues/361
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/94aa517f6030d0090a43ae4bf9307b2449dbe78f0a8c6cd726ede03e575d3cac/javascript-obfuscator/javascript-obfuscator/issues/361
og:image:altExpected Behavior Variable assignment without declaration when using object destructuring should work. According to destructuring assignment in MDN {a, b} = {a: 1, b: 2} is not valid stand-alone sy...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameskiritsis
hostnamegithub.com
expected-hostnamegithub.com
Noneb415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30
turbo-cache-controlno-preview
go-importgithub.com/javascript-obfuscator/javascript-obfuscator git https://github.com/javascript-obfuscator/javascript-obfuscator.git
octolytics-dimension-user_id23015672
octolytics-dimension-user_loginjavascript-obfuscator
octolytics-dimension-repository_id58360147
octolytics-dimension-repository_nwojavascript-obfuscator/javascript-obfuscator
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id58360147
octolytics-dimension-repository_network_root_nwojavascript-obfuscator/javascript-obfuscator
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release22f98521e99f504294ab0812b66104d50eb75a70
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/361#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F361
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F361
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=javascript-obfuscator%2Fjavascript-obfuscator
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/361
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/361
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/361
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/361
javascript-obfuscator https://github.com/javascript-obfuscator
javascript-obfuscatorhttps://github.com/javascript-obfuscator/javascript-obfuscator
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/361
Notifications https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Fork 1.7k https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Star 16.2k https://github.com/login?return_to=%2Fjavascript-obfuscator%2Fjavascript-obfuscator
Code https://github.com/javascript-obfuscator/javascript-obfuscator
Issues 15 https://github.com/javascript-obfuscator/javascript-obfuscator/issues
Pull requests 5 https://github.com/javascript-obfuscator/javascript-obfuscator/pulls
Discussions https://github.com/javascript-obfuscator/javascript-obfuscator/discussions
Actions https://github.com/javascript-obfuscator/javascript-obfuscator/actions
Projects https://github.com/javascript-obfuscator/javascript-obfuscator/projects
Security and quality 0 https://github.com/javascript-obfuscator/javascript-obfuscator/security
Insights https://github.com/javascript-obfuscator/javascript-obfuscator/pulse
Code https://github.com/javascript-obfuscator/javascript-obfuscator
Issues https://github.com/javascript-obfuscator/javascript-obfuscator/issues
Pull requests https://github.com/javascript-obfuscator/javascript-obfuscator/pulls
Discussions https://github.com/javascript-obfuscator/javascript-obfuscator/discussions
Actions https://github.com/javascript-obfuscator/javascript-obfuscator/actions
Projects https://github.com/javascript-obfuscator/javascript-obfuscator/projects
Security and quality https://github.com/javascript-obfuscator/javascript-obfuscator/security
Insights https://github.com/javascript-obfuscator/javascript-obfuscator/pulse
Object destructuring assignment does not work for variables initialized previouslyhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/361#top
https://github.com/skiritsis
skiritsishttps://github.com/skiritsis
on Dec 13, 2018https://github.com/javascript-obfuscator/javascript-obfuscator/issues/361#issue-390647041
destructuring assignment in MDNhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.