{"id":15906368,"url":"https://github.com/softchris/js-snippets","last_synced_at":"2026-06-24T06:33:57.955Z","repository":{"id":72018449,"uuid":"159086517","full_name":"softchris/js-snippets","owner":"softchris","description":"snippets for javascript meant to be installed in vscode","archived":false,"fork":false,"pushed_at":"2020-05-21T18:51:20.000Z","size":2557,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T22:43:39.989Z","etag":null,"topics":[],"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/softchris.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-11-26T00:00:57.000Z","updated_at":"2020-05-21T18:51:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ed8fe48-c584-4448-84c7-abad7bc4ae81","html_url":"https://github.com/softchris/js-snippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/softchris/js-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softchris%2Fjs-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softchris%2Fjs-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softchris%2Fjs-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softchris%2Fjs-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softchris","download_url":"https://codeload.github.com/softchris/js-snippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softchris%2Fjs-snippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34720920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-24T02:00:07.484Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-06T13:22:54.108Z","updated_at":"2026-06-24T06:33:57.930Z","avatar_url":"https://github.com/softchris.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# js-snippets\n\nThis is an extension meant to give you some awesome JS snippets\n![alt text](images/js-snippets.gif \"Using the snippet\")\n\n## Features\n\nA collection of JS snippets\n\nThe following commands are available:\n\n- `js-log`, prints console.log()\n- `js-log-err`, prints console.error()\n- `js-log-warn`, prints console.warn(),\n- `js-log-info`, prints console.info()\n- `js-elif`, prints if, else\n- `js-eliff`, prints if, else-if, else\n- `js-tcf`, prints try, catch, finally\n- `js-scd`, prints switch, case, default\n- `js-arr-filter`, creates an array and calls `filter()`\n- `js-arr-reduce`, creates an array and calls `reduce()`\n- `js-arr-contains`, creates an array and calls `some()`\n- `js-arr-all`, creates an array and calls `every()`,\n- `js-dest-array`, creates an array and applies destructuring on it\n- `js-dest-object`, creates an object and applies destrucring on it\n- `js-dest-param`, creates a function and passes a parameter that we apply\n  destructuring to\n- `js-promise-create`, creates a Promise by instantiating it\n- `js-promise-shorthand`, uses the static resolve/reject, good for unit tests\n- `js-promise-all`, uses the static all(), allows us to have a list of Promises finish at the same time\n- `js-async-await`, demonstrates async/await\n- `js-regex-test-digits`, demonstrates string method `test()` that takes a regular expression and return true/false if string is number.\n- `js-regex-test-word`, demonstrates string method `test()` that takes a regular expression and returns  true/false if string is word.\n- `js-regex-match`, demonstrates RegEx match, that.\n- `js-regex-match-named-group`, demonstrates RegEx match and use a so called named group.\n- `js-rest`, shows the ES6 features REST.\n- `js-rest-function`, shows the REST feature when used in a function.\n- `js-property-shorthand`, shows how you can type less when declaring properties in an object.\n- `js-computed-props`, shows computed properties in an object.\n\n## Release Notes\n\nThis is the release notes.\n\n### 1.0.0\n\nAdded video to showcase usage\n\n### 0.0.6\n\nadded promises and async/await\n\n### 0.0.6\n\nChanged array commands so you find the under `js-arr-*`.\n\nAdded `destructuring` snippets, read more on it here [Destructuring(https://developer.mozillaorg/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)\n\n### 0.0.5\n\nadding repo and image, renaming all commands to `js-` something to make it easier to find them\n\n### 0.0.4\n\nminor corrections\n\n### 0.0.3\n\n- added try, catch, finally\n- added switch, case, default\n- added array methods `filter()`, `reduce()`, `some()` and `all`\n\n### 0.0.2\n\nadded if, else, better docs\n\n### 0.0.1\n\nsome log functions for now\n\n## Publisher\n\nChris Noring\n@chris_noring\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftchris%2Fjs-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftchris%2Fjs-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftchris%2Fjs-snippets/lists"}