René's URL Explorer Experiment


Title: javascript-obfuscator break Assignment without declaration. · Issue #328 · javascript-obfuscator/javascript-obfuscator · GitHub

Open Graph Title: javascript-obfuscator break Assignment without declaration. · Issue #328 · javascript-obfuscator/javascript-obfuscator

X Title: javascript-obfuscator break Assignment without declaration. · Issue #328 · javascript-obfuscator/javascript-obfuscator

Description: javascript-obfuscator break Assignment without declaration. This issue is edited after post. function main() { const o = {v: 1} let v; ({v} = o); console.log(v); } main(); Expected Behavior stdout 1. Current Behavior stdout undefined. St...

Open Graph Description: javascript-obfuscator break Assignment without declaration. This issue is edited after post. function main() { const o = {v: 1} let v; ({v} = o); console.log(v); } main(); Expected Behavior stdout ...

X Description: javascript-obfuscator break Assignment without declaration. This issue is edited after post. function main() { const o = {v: 1} let v; ({v} = o); console.log(v); } main(); Expected Behavior stdout ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"javascript-obfuscator break Assignment without declaration.","articleBody":"javascript-obfuscator break Assignment without declaration.\r\n\r\nThis issue is edited after post.\r\n\r\n~~~js\r\nfunction main() {\r\n  const o = {v: 1}\r\n  let v;\r\n  ({v} = o);\r\n  console.log(v);\r\n}\r\n\r\nmain();\r\n~~~\r\n\r\n## Expected Behavior\r\n\r\nstdout `1`.\r\n\r\n## Current Behavior\r\n\r\nstdout `undefined`.\r\n\r\n## Steps to Reproduce (for bugs)\r\n\r\n`yarn javascript-obfuscator src/main.js`\r\n\r\n## Your Environment\r\n\r\n* Obfuscator version used: 0.18.1\r\n* Node version used: v9.11.2\r\n\r\n# Stack trace\r\n\r\nNone.\r\n\r\n## Minimal working example that will help to reproduce issue\r\n\r\n`src/main.js`\r\n\r\n~~~js\r\nfunction main() {\r\n  const o = {v: 1}\r\n  let v;\r\n  ({v} = o);\r\n  console.log(v);\r\n}\r\n\r\nmain();\r\n~~~\r\n\r\ncommand.\r\n\r\n~~~sh\r\nyarn javascript-obfuscator src/main.js\r\n~~~\r\n\r\ncompiled.\r\n\r\n~~~js\r\nfunction main() {\r\n  const _0x501e82 = { v: 0x1 };\r\n  let _0x5b6c40;\r\n  ({ v } = _0x501e82);\r\n  console[\"log\"](_0x5b6c40);\r\n}\r\nmain();\r\n~~~\r\n\r\n# detail\r\n\r\nI use javascript-obfuscator.\r\nMy software is breaked.\r\nI found small example.\r\n\r\n~~~js\r\nfunction main() {\r\n  const o = {v: 1}\r\n  let v;\r\n  ({v} = o);\r\n  console.log(v);\r\n}\r\n\r\nmain();\r\n~~~\r\n\r\nThe code at 3 of lines is standard JavaScript statement.\r\n\r\n\u003e The round braces ( ... ) around the assignment statement is required syntax when using object literal destructuring assignment without a declaration.\r\n\u003e\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\u003e\r\n\u003e NOTE: Your ( ... ) expression needs to be preceded by a semicolon or it may be used to execute a function on the previous line.\r\n\u003e\r\n\u003e [Destructuring assignment - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Assignment_without_declaration)\r\n\r\n## webpack-obfuscator or obfuscator-loader\r\n\r\nI use `webpack.config.js`.\r\n\r\n~~~js\r\nconst JavaScriptObfuscator = require(\"webpack-obfuscator\");\r\nconst path = require(\"path\");\r\n\r\nmodule.exports = {\r\n  entry: {\r\n    main: \"./src/main.js\"\r\n  },\r\n  output: {\r\n    path: path.resolve(__dirname, \"app\"),\r\n    filename: \"[name].js\"\r\n  },\r\n  plugins: [new JavaScriptObfuscator()]\r\n};\r\n~~~\r\n\r\n* `yarn webpack --mode development \u0026\u0026 node app/main.js` output `1` (expected).\r\n* `yarn webpack --mode production \u0026\u0026 node app/main.js` output `undefined` (error).\r\n\r\nwebpack-obfuscator in production compile code as below.\r\n\r\n~~~js\r\n  function(e, n) {\r\n    ({ v: v } = { v: 1 }), console[_0xef72(\"0xb\")](void 0);\r\n  }\r\n~~~\r\n\r\nThis code ends of files.\r\n\r\nI wondered whether to post to the issue of webpack-obfuscator,\r\nSince I confirmed that the same problem will also occur in obfuscator-loader,\r\nI decided to post a problem on javascript-obfuscator issue.\r\n","author":{"url":"https://github.com/ncaq","@type":"Person","name":"ncaq"},"datePublished":"2018-09-06T09:22:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/328/javascript-obfuscator/issues/328"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:cb5043e8-213c-00ce-ae6c-e1f75f9ec1c4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9656:1090D2:CB3CF8:1239CC1:6A631FBC
html-safe-nonce1d0d3ed405c4f1ee9af3ffaeccbd5365a4a392f21a14f8c893f1589b541686c9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjU2OjEwOTBEMjpDQjNDRjg6MTIzOUNDMTo2QTYzMUZCQyIsInZpc2l0b3JfaWQiOiI4MDY3MjE1MDg3OTI0MDkyODYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd735f01f9da68d29bf8fe1cc10ba920719e359385cb5c01bb2551062cb6f6887
hovercard-subject-tagissue:357568510
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/328/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fda3e69279894beb95058a0bb16af7c883900ee0727fee8d1821c0425be84d6c/javascript-obfuscator/javascript-obfuscator/issues/328
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fda3e69279894beb95058a0bb16af7c883900ee0727fee8d1821c0425be84d6c/javascript-obfuscator/javascript-obfuscator/issues/328
og:image:altjavascript-obfuscator break Assignment without declaration. This issue is edited after post. function main() { const o = {v: 1} let v; ({v} = o); console.log(v); } main(); Expected Behavior stdout ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamencaq
hostnamegithub.com
expected-hostnamegithub.com
None1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6
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
release6a93e25585f487ddff9e3996c06d5b869d6e1828
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/328#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-obfuscator%2Fjavascript-obfuscator%2Fissues%2F328
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%2F328
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/328
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/328
Reloadhttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/328
Please reload this pagehttps://github.com/javascript-obfuscator/javascript-obfuscator/issues/328
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/328
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
javascript-obfuscator break Assignment without declaration.https://github.com/javascript-obfuscator/javascript-obfuscator/issues/328#top
need more infohttps://github.com/javascript-obfuscator/javascript-obfuscator/issues?q=state%3Aopen%20label%3A%22need%20more%20info%22
https://github.com/ncaq
ncaqhttps://github.com/ncaq
on Sep 6, 2018https://github.com/javascript-obfuscator/javascript-obfuscator/issues/328#issue-357568510
Destructuring assignment - JavaScript | MDNhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Assignment_without_declaration
need more infohttps://github.com/javascript-obfuscator/javascript-obfuscator/issues?q=state%3Aopen%20label%3A%22need%20more%20info%22
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.