{"id":16445527,"url":"https://github.com/japrozs/snippety","last_synced_at":"2026-04-09T13:49:10.016Z","repository":{"id":117496579,"uuid":"295075404","full_name":"japrozs/Snippety","owner":"japrozs","description":"This is a snippet extension for VSCode. This extension provides you with snippets of all web programming frameworks in Python and JavaScript","archived":false,"fork":false,"pushed_at":"2020-10-13T04:26:13.000Z","size":407,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-09T01:04:01.152Z","etag":null,"topics":["angular","axios","classnames","django","es6","es7","flask","japrozsinghsaini","javascript","lodash","nextjs","nodejs","python","react","redux","snippets","vscode","vue","vuex"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=JaprozSinghSaini.snippety","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/japrozs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2020-09-13T04:08:26.000Z","updated_at":"2023-12-05T06:55:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"e64f0010-d6d0-40b8-b3cd-e43e81fb1355","html_url":"https://github.com/japrozs/Snippety","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/japrozs%2FSnippety","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japrozs%2FSnippety/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japrozs%2FSnippety/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/japrozs%2FSnippety/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/japrozs","download_url":"https://codeload.github.com/japrozs/Snippety/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240831206,"owners_count":19864711,"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":["angular","axios","classnames","django","es6","es7","flask","japrozsinghsaini","javascript","lodash","nextjs","nodejs","python","react","redux","snippets","vscode","vue","vuex"],"created_at":"2024-10-11T09:44:41.455Z","updated_at":"2025-12-30T18:58:19.895Z","avatar_url":"https://github.com/japrozs.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Snippety\r\n\r\n[![Version](https://vsmarketplacebadge.apphb.com/version/JaprozSinghSaini.snippety.svg)](https://vsmarketplacebadge.apphb.com/version-short/JaprozSinghSaini.snippety.svg)\r\n[![Install](https://vsmarketplacebadge.apphb.com/installs/JaprozSinghSaini.snippety.svg)](https://vsmarketplacebadge.apphb.com/installs-short/JaprozSinghSaini.snippety.svg)\r\n[![Downloads](https://vsmarketplacebadge.apphb.com/downloads/JaprozSinghSaini.snippety.svg)](https://vsmarketplacebadge.apphb.com/downloads-short/JaprozSinghSaini.snippety.svg)\r\n[![Ratings](https://vsmarketplacebadge.apphb.com/rating-short/JaprozSinghSaini.snippety.svg)](https://vsmarketplacebadge.apphb.com/rating-short/JaprozSinghSaini.snippety.svg)\u003cbr\u003e\r\nThis extension provides you with Snippets for all web programming frameworks such as React, Redux, Vue, Angular, Flask, Django and much more https://visualstudio.com\r\n\r\n## What's new\r\n\r\nSupport has been added for Ruby on Rails and also for the new and upcoming `ml5js` library which is a machine learning library for the browser.You can visit it at [ml5js.org](https://ml5js.org)\r\n\r\n## Languages\r\n\r\nSnippety provides support for the following languages:\r\n\r\n- JavaScript\r\n  - React\r\n  - ES7\r\n  - TypeScript\r\n  - Vue\r\n  - Angular\r\n  - Next\r\n  - Lodash\r\n  - GraphQL\r\n  - Express\r\n  - Ml5JS\r\n- Python\r\n  - Flask\r\n  - Django\r\n- Ruby\r\n  - Rails\r\n\r\n### Visual Studio Marketplace\r\n\r\nLaunch *Quick Open*:\r\n\r\n- [_Linux_](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf): `Ctrl+P`\r\n- [_macOS_](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf): `⌘P`\r\n- [_Windows_](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf): `Ctrl+P`\r\n\r\nPaste the following command and press `Enter`:\r\n\r\n```bash\r\next install japrozsaini.snippety\r\n```\r\n\r\n### GitHub Repository Clone\r\n\r\nChange to your `.vscode/extensions` [VS Code extensions directory](https://code.visualstudio.com/docs/extensions/install-extension#_side-loading). Depending on your platform it is located in the following folders:\r\n\r\n- _Linux_: `~/.vscode/extensions`\r\n- _macOS_: `~/.vscode/extensions`\r\n- _Windows_: `%USERPROFILE%\\.vscode\\extensions`\r\n\r\n```bash\r\ngit clone https://github.com/Japroz-Saini/Snippety\r\n```\r\n\r\nHere is direct link to marketplace [Snippety](https://marketplace.visualstudio.com/items?itemName=JaprozSinghSaini.snippety)\r\n\r\n## Supported languages (file extensions)\r\n\r\n- JavaScript (.js)\r\n- JavaScript React (.jsx)\r\n- TypeScript (.ts)\r\n- TypeScript React (.tsx)\r\n- Vue (.vue)\r\n- Angular (.ts)\r\n- HTML (.html)\r\n- Python (.py)\r\n- Vue (.vue)\r\n\r\n## Commands\r\n\r\nVarious Commands with their snippets\r\n\r\n#### rfce\r\n\r\nGenerates a ReactJS functional Component\r\n\r\n```javascript\r\nimport React from \"react\";\r\n\r\nfunction nav() {\r\n  return \u003cdiv\u003e\u003c/div\u003e;\r\n}\r\n\r\nexport default nav;\r\n```\r\n\r\n### Vaction\r\n\r\nGenerates a Standard VueX Action\r\n\r\n```javascript\r\nactions: {\r\n    updateValue({commit}, payload) {\r\n        commit('updateValue', payload);\r\n    }\r\n}\r\n\r\n```\r\n\r\n### a-guard-can-activate\r\n\r\nGenerates an angular Snippets\r\n\r\n```javascript\r\nimport { Injectable } from \"@angular/core\";\r\nimport {\r\n  ActivatedRouteSnapshot,\r\n  CanActivate,\r\n  RouterStateSnapshot,\r\n} from \"@angular/router\";\r\n\r\n@Injectable({ providedIn: \"root\" })\r\nexport class NameGuard implements CanActivate {\r\n  constructor() {}\r\n\r\n  canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {\r\n    return true;\r\n  }\r\n}\r\n```\r\n\r\n### next-api-method\r\n\r\nGenerates a snippet for a next-api method\r\n\r\n```javascript\r\nexport default (req, res) =\u003e {\r\n  if (req.method === \"POST\") {\r\n  } else {\r\n  }\r\n};\r\n```\r\n\r\n### Redux\r\n\r\nGenerates Redux Snippets for ReactJS\r\n\r\n```javascript\r\nconst mapStateToProps = (state) =\u003e ({});\r\n\r\nconst mapDispatchToProps = {};\r\n```\r\n\r\n### Python\r\n\r\nCan generate Python Code such as below:\r\n\r\n```python\r\n\r\nclass Robot:\r\n    '''Represents a robot, with a name.'''\r\n    # A class variable, counting the number of robots\r\n    population = 0\r\n    def __init__(self, name):\r\n        '''Initializes the data.'''\r\n        self.name = name\r\n        print('(Initializing {})'.format(self.name))\r\n        # When this person is created, the robot\r\n        # adds to the population\r\n        Robot.population += 1\r\n    def die(self):\r\n        '''I am dying.'''\r\n        print('{} is being destroyed!'.format(self.name))\r\n        Robot.population -= 1\r\n        if Robot.population == 0:\r\n            print('{} was the last one.'.format(self.name))\r\n        else:\r\n            print('There are still {:d} robots working.'.format(\r\n                Robot.population))\r\n    def say_hi(self):\r\n        '''Greeting by the robot.\r\n        Yeah, they can do that.'''\r\n        print('Greetings, my masters call me {}.'.format(self.name))\r\n    @classmethod\r\n    def how_many(cls):\r\n        '''Prints the current population.'''\r\n        print('We have {:d} robots.'.format(cls.population))\r\ndroid1 = Robot('R2-D2')\r\ndroid1.say_hi()\r\nRobot.how_many()\r\ndroid2 = Robot('C-3PO')\r\ndroid2.say_hi()\r\nRobot.how_many()\r\nprint('Robots can do some work here.')\r\nprint('Robots have finished their work. So lets destroy them.')\r\ndroid1.die()\r\ndroid2.die()\r\nRobot.how_many()\r\n```\r\n\r\n## Ruby on Rails\r\n\r\nType commands starting with rails to see all the various snippets for Ruby on Rails\r\n\r\n```ruby\r\nArray.new(${1:len}) { |${2:i}| $0 }\r\n```\r\n\r\n## Extension Details\r\n\r\n```json\r\n{\r\n  \"name\": \"snippety\",\r\n  \"displayName\": \"Snippety\",\r\n  \"description\": \"Snippets for all your web programming needs (HTML, CSS, React, Redux,Vue, VueX, lodash, Next, classnames ES6, ES7, GraphQL, NodeJS)!!\",\r\n  \"version\": \"1.2.1\",\r\n  \"publisher\": \"JaprozSinghSaini\",\r\n  \"author\": {\r\n    \"name\": \"Japroz Singh Saini\",\r\n    \"email\": \"sainijaproz@gmail.com\",\r\n    \"url\": \"https://japrozsaini.me\"\r\n  },\r\n  \"license\": \"MIT\",\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"https://github.com/Japroz-Saini/Snippety\"\r\n  },\r\n  \"bugs\": {\r\n    \"url\": \"https://github.com/Japroz-Saini/Snippety/issues\"\r\n  },\r\n  \"icon\": \"icon.png\",\r\n  \"keywords\": [\r\n    \"Snippets\",\r\n    \"React Snippets\",\r\n    \"Python Snippets\",\r\n    \"Redux Snippets\",\r\n    \"Angular Snippets\",\r\n    \"Snippety\",\r\n    \"Angular\",\r\n    \"All in One\",\r\n    \"Flask\",\r\n    \"Django\",\r\n    \"Web Snippets\",\r\n    \"Next\",\r\n    \"Lodash\",\r\n    \"Python2\",\r\n    \"Python3\"\r\n  ],\r\n  \"engines\": {\r\n    \"vscode\": \"^1.1.0\"\r\n  },\r\n  \"categories\": [\"Snippets\"],\r\n  \"contributes\": {\r\n    \"snippets\": [\r\n      {\r\n        \"language\": \"javascript\",\r\n        \"path\": \"./snippets/snippets.code-snippets\"\r\n      },\r\n      {\r\n        \"language\": \"html\",\r\n        \"path\": \"./snippets/snippets.code-snippets\"\r\n      },\r\n      {\r\n        \"language\": \"javascriptreact\",\r\n        \"path\": \"./snippets/snippets.code-snippets\"\r\n      },\r\n      {\r\n        \"language\": \"python\",\r\n        \"path\": \"./snippets/snippets.code-snippets\"\r\n      },\r\n      {\r\n        \"language\": \"markdown\",\r\n        \"path\": \"./snippets/snippets.code-snippets\"\r\n      }\r\n    ]\r\n  }\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaprozs%2Fsnippety","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaprozs%2Fsnippety","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaprozs%2Fsnippety/lists"}