{"id":19150444,"url":"https://github.com/vicompany/destructuring-assignment","last_synced_at":"2025-02-22T20:45:32.003Z","repository":{"id":151131305,"uuid":"79243896","full_name":"vicompany/destructuring-assignment","owner":"vicompany","description":"JavaScript Object and Array destructuring workshop","archived":false,"fork":false,"pushed_at":"2017-09-22T09:08:39.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-03T18:15:22.722Z","etag":null,"topics":["es6","javascript"],"latest_commit_sha":null,"homepage":"","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/vicompany.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-17T15:52:53.000Z","updated_at":"2023-04-11T15:19:46.000Z","dependencies_parsed_at":"2024-03-08T22:45:54.217Z","dependency_job_id":null,"html_url":"https://github.com/vicompany/destructuring-assignment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicompany%2Fdestructuring-assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicompany%2Fdestructuring-assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicompany%2Fdestructuring-assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vicompany%2Fdestructuring-assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vicompany","download_url":"https://codeload.github.com/vicompany/destructuring-assignment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240236198,"owners_count":19769571,"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":["es6","javascript"],"created_at":"2024-11-09T08:12:03.769Z","updated_at":"2025-02-22T20:45:31.976Z","avatar_url":"https://github.com/vicompany.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Destructuring assignment workshop\n\nThe `destructuring assignment` syntax is a JavaScript expression that makes it possible to extract data from arrays or objects into variables.\n\nHow to extract the values is specified via `patterns`:\n\n```javascript\nconst user = { first: 'John', last: 'Doe', age: 35 };\nconst numbers = [1, 2, 3, 4, 5];\n\n// Object destructuring\nconst { first, age } = user; // John, 35;\n\n// Array destructuring\nconst [a, b, c] = numbers; // 1, 2, 3\n```\n\n## When can it be used?\n\n1. For variable declarations and assignments.\n2. Parameter definitions.\n3. In a `for-of` loop.\n\n## I want to learn this\n\nAll destructuring tips and tricks are covered using (failing) unit tests. It's up to you to make the tests pass. You can use the [test/workshop.js](test/workshop.js) file.\n\n## More information\n\n* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)\n* [Exploring ES6](http://exploringjs.com/es6/ch_destructuring.html)\n\n## How to run the tests?\n\nClone the project and:\n\n* Run `npm install`.\n* Followed by `npm test` or `npm start` to watch.\n* Enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicompany%2Fdestructuring-assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvicompany%2Fdestructuring-assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvicompany%2Fdestructuring-assignment/lists"}