├── .github └── workflows │ └── main.yml ├── .gitignore ├── LICENSE ├── README.md ├── Schemas └── language.js ├── api.png ├── app.js ├── json ├── frameworks │ └── javascript │ │ └── javascript.js └── languages │ ├── Dart │ └── Dart.js │ ├── cpp │ └── cpp.js │ ├── csharp │ └── csharp.js │ ├── css │ └── css.js │ ├── go │ └── go.js │ ├── html │ └── html.js │ ├── java │ └── java.js │ ├── javascript │ └── javascript.js │ ├── kotlin │ └── kotlin.js │ ├── python │ └── python.js │ └── rust │ └── rust.js ├── package-lock.json ├── package.json ├── tests ├── framework.test.js └── language.test.js ├── v1 ├── frameworks │ └── frameworks.route.js ├── index.js └── languages │ ├── cpp │ ├── arrays.js │ ├── basic-inputs-and-outputs.js │ ├── basics.js │ ├── compilers.js │ ├── constants.js │ ├── dataTypes.js │ ├── functions.js │ ├── keywords.js │ ├── operators.js │ ├── statements-and-flow-control.js │ └── variables.js │ ├── css │ └── selectors.js │ ├── html │ ├── a.js │ ├── abbr.js │ ├── address.js │ ├── article.js │ ├── aside.js │ ├── b.js │ ├── body.js │ ├── br.js │ ├── comments.js │ ├── div.js │ ├── footer.js │ ├── head.js │ ├── header.js │ └── p.js │ ├── javascript │ ├── arrays.js │ ├── booleans.js │ ├── functions.js │ ├── null.js │ ├── number.js │ ├── string.js │ └── variables.js │ └── languages.route.js ├── views ├── index.handlebars ├── layout.handlebars └── static │ └── style │ ├── index.css │ └── layout.css └── yarn.lock /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: LanguageAPI CI 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Install nodejs 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: '11.10.1' 20 | - run: yarn install --frozen-lockfile 21 | - run: yarn test 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/node 3 | # Edit at https://www.gitignore.io/?templates=node 4 | 5 | ### Node ### 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | lerna-debug.log* 13 | 14 | # Diagnostic reports (https://nodejs.org/api/report.html) 15 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 16 | 17 | # Runtime data 18 | pids 19 | *.pid 20 | *.seed 21 | *.pid.lock 22 | 23 | # Directory for instrumented libs generated by jscoverage/JSCover 24 | lib-cov 25 | 26 | # Coverage directory used by tools like istanbul 27 | coverage 28 | *.lcov 29 | 30 | # nyc test coverage 31 | .nyc_output 32 | 33 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 34 | .grunt 35 | 36 | # Bower dependency directory (https://bower.io/) 37 | bower_components 38 | 39 | # node-waf configuration 40 | .lock-wscript 41 | 42 | # Compiled binary addons (https://nodejs.org/api/addons.html) 43 | build/Release 44 | 45 | # Dependency directories 46 | node_modules/ 47 | jspm_packages/ 48 | 49 | # TypeScript v1 declaration files 50 | typings/ 51 | 52 | # TypeScript cache 53 | *.tsbuildinfo 54 | 55 | # Optional npm cache directory 56 | .npm 57 | 58 | # Optional eslint cache 59 | .eslintcache 60 | 61 | # Optional REPL history 62 | .node_repl_history 63 | 64 | # Output of 'npm pack' 65 | *.tgz 66 | 67 | # Yarn Integrity file 68 | .yarn-integrity 69 | 70 | # dotenv environment variables file 71 | .env 72 | .env.test 73 | 74 | # parcel-bundler cache (https://parceljs.org/) 75 | .cache 76 | 77 | # next.js build output 78 | .next 79 | 80 | # nuxt.js build output 81 | .nuxt 82 | 83 | # rollup.js default build output 84 | dist/ 85 | 86 | # Uncomment the public line if your project uses Gatsby 87 | # https://nextjs.org/blog/next-9-1#public-directory-support 88 | # https://create-react-app.dev/docs/using-the-public-folder/#docsNav 89 | # public 90 | 91 | # Storybook build outputs 92 | .out 93 | .storybook-out 94 | 95 | # vuepress build output 96 | .vuepress/dist 97 | 98 | # Serverless directories 99 | .serverless/ 100 | 101 | # FuseBox cache 102 | .fusebox/ 103 | 104 | # DynamoDB Local files 105 | .dynamodb/ 106 | 107 | # Temporary folders 108 | tmp/ 109 | temp/ 110 | 111 | # End of https://www.gitignore.io/api/node -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Matt Smith 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Coding Challenge 28 | LANGO - The Complete Dev Language API 💻 4 | 5 | ![GitHub package.json version](https://img.shields.io/github/package-json/v/zero-to-mastery/coding_challenge-28?style=for-the-badge) 6 | ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/zero-to-mastery/coding_challenge-28/LanguageAPI%20CI?style=for-the-badge) 7 | ![GitHub](https://img.shields.io/github/license/zero-to-mastery/coding_challenge-28?style=for-the-badge) 8 | ![GitHub contributors](https://img.shields.io/github/contributors/zero-to-mastery/coding_challenge-28?style=for-the-badge) 9 | ![GitHub last commit](https://img.shields.io/github/last-commit/zero-to-mastery/coding_challenge-28?style=for-the-badge) 10 | 11 | As a community we are going to build an API! Lango aims to be the the complete development language API. A simple yet extensive HTTP API, providing its users with the ability to request both: 12 | 13 | - Generalised data about their desired language, framework or standard. 14 | - Specific language feature, for example: requesting information and examples on JavaScript Functions. 15 | 16 | ## Motivation 17 | 18 | The motivation behind this project is not only to provide a project that creates a learning opportunity in the technologies and stack used to create APIs and populating the data within the project, but also to become a final product that will be useful to developers and student alike when creating their applications/websites. 19 | 20 | ## Code Style 21 | 22 | We are using Prettier to create a uniformed code base that is easy to read for everyone. If you do not have Prettier set up in you editor, follow the advice set out [this video](https://www.youtube.com/watch?v=h3PJjP0nE98), ensuring that you have the `Format on save` option enabled. 23 | 24 | If you are using an editor other than Visual Studio code, do a quick google for your editor. If you are still stuck, ask for advice in our Discord! 25 | 26 | ## Tech Stack 27 | 28 | - Node 29 | - Express 30 | - Handlebars 31 | - Jest 32 | 33 | ## Features 34 | 35 | - Lango should have beginner friendly documentation 36 | - Lango should support for the various language in the programming and development world 37 | - Lango should have a endpoint for searching general details and statistics for the requested language 38 | - Lango should have a endpoint for looking up information and examples for the specified element of the language 39 | - Lango should have a endpoint for requesting details about specified language standards, such as ECMASCRIPT 40 | 41 | ## Getting Started / Installation 42 | 43 | To get started with this project, be sure to check out the issues board [here](https://github.com/MattCSmith/coding_challenge-28/issues), to find a task. The pinned issues at the top of that page are generally considered on going and can have mutliple people working on them at same time. If you have any questions on getting started, ask in the [#coding-challenge channel](https://discordapp.com/channels/423464391791476747/434849407054381096/716684388028383272) in discord 44 | 45 | #### Installing and Setup 46 | 47 | 1. ❗ **Fork this repo to your Github account** 48 | 2. Clone **your fork** to you local machine 49 | 3. Open the project in your favourite code editor 50 | 4. Run `npm install` or `yarn install` 51 | 52 | ## Tests 53 | 54 | - Use `npm test` or `yarn test` to run the tests. 55 | 56 | #### Tests breakdown. 57 | 1. **framework.test.js** - tests all the frameworks `/json/frameworks/{framework_name}/{framework_name}.js` 58 | 2. **language.test.js** - tests all the languages `/json/languages/{language_name}/{language_name}.js` 59 | 60 | ## Resource for working with API's 61 | 1. [Complete Web Developer](https://academy.zerotomastery.io/courses/complete-web-developer-in-2020-zero-tomastery/lectures/15572533?affcode=441520_yjdmgl4p&?utm_source=github&utm_medium=coding_challenge-28) course over at the [ZTM Academy](https://zerotomastery.io/academy/?utm_source=github&utm_medium=coding_challenge-28) 62 | 2. [Build A RESTful Api With Node.js And Express.Js Part One](https://medium.com/@purposenigeria/build-a-restful-api-with-node-js-and-express-js-d7e59c7a3dfb) 63 | 64 | ## Looking for more challenges? 65 | 66 | We highly recommend checking out the back catalogue of [coding challenges](https://zerotomastery.io/community/coding-challenges/?utm_source=github&utm_medium=coding_challenge-28). With varying levels of complexity there is something to test and push every skill level. 67 | 68 | ## One Last Thing! 69 | 70 | **Please note: As with all my challenges there is zero benefit or monetary gain I receive from it. This is just my way of thanking my students and making sure that you are able to continue gaining valuable knowledge outside of just my videos. It would mean a lot to me if you are able to rate my course...5 star reviews make my day :)** 71 | -------------------------------------------------------------------------------- /Schemas/language.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Instructions to add new language/framework: 3 | 1. create a new directory in /json/language or /json/language. 4 | 2. create a new js file with the same name as the directory created above. 5 | Ex. if the directory was "python", then the file should be "python.js" 6 | 3. copy/paste the content below this comment in this newly created file and change stuff accordingly. 7 | 8 | * The file structure should look like this: 9 | |-> json 10 | |-> languages 11 | |-> {language_name} 12 | |-> {language_name}.js 13 | 14 | */ 15 | 16 | // make sure the variable holding the language object("schema__language" in this case) is same as the file name 17 | const schema__language = { 18 | name: 'name of language', 19 | description_short: 'a short desc', 20 | description: 'description', 21 | paradigm: ['paradigm names'], 22 | developed_by: 'name of developer(s)', 23 | first_appeared: 'type: date', 24 | version: { 25 | current_stable: { 26 | version_name: 'v1.0', 27 | code_name: '', 28 | }, 29 | all_versions: [ 30 | { 31 | version_name: 'v1.0', 32 | code_name: '', 33 | }, 34 | ], 35 | }, 36 | typing_descipline: ['static', 'strong', 'affine'], 37 | platform: [], 38 | operating_system: [], 39 | license: ['MIT'], 40 | examples: { 41 | hello_world: 'brave enough to put some code here? xD', 42 | }, 43 | }; 44 | 45 | module.exports = schema__language; -------------------------------------------------------------------------------- /api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zero-to-mastery/coding_challenge-28/cdd5529718916e207cbff325cea80783a3104435/api.png -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const bodyParser = require("body-parser"); 3 | const cors = require("cors"); 4 | const handlebars = require("express-handlebars"); 5 | const path = require("path"); 6 | 7 | const app = express(); 8 | 9 | const PORT = process.env.PORT || 3007; 10 | 11 | const v1Routes = require("./v1/index"); 12 | 13 | // added path for static assets 14 | app.use(express.static(path.join(__dirname, "views", "static"))); 15 | 16 | app.use(bodyParser.json()); 17 | app.use( 18 | bodyParser.urlencoded({ 19 | extended: true, 20 | }) 21 | ); 22 | 23 | app.set("view engine", "handlebars"); 24 | app.engine( 25 | "handlebars", 26 | handlebars({ 27 | defaultLayout: "layout", 28 | layoutsDir: path.join(__dirname, "views"), 29 | }) 30 | ); 31 | 32 | app.use("/api/v1", v1Routes); 33 | 34 | app.listen(PORT, () => { 35 | console.log(`Server is running on port: ${PORT}`); 36 | }); 37 | -------------------------------------------------------------------------------- /json/frameworks/javascript/javascript.js: -------------------------------------------------------------------------------- 1 | const javascript = { 2 | name: 'Javascript', 3 | description_short: 'JavaScript is a programming language that conforms to the ECMAScript specification.', 4 | description: 'JavaScript, often abbreviated as JS, is a programming language that conforms to the ECMAScript specification. JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.', 5 | paradigm: ['event-driven', 'functional', 'imperative'], 6 | developed_by: [ 7 | { 8 | name: "Brendan Eich", 9 | endpoint: "/developers/brendan-eich", 10 | website: "https://brendaneich.com/", 11 | twitter: "https://twitter.com/BrendanEich" 12 | } 13 | ], 14 | first_appeared: '1995-12-04', 15 | version: { 16 | current_stable: { 17 | version_name: 'ECMASCRIPT 2019', 18 | code_name: 'ES19', 19 | release_data: "June 2019" 20 | }, 21 | upcoming_version: { 22 | version_name: "ECMASCRIPT 2020", 23 | code_name: "ES20", 24 | expected_release_date: "TBC" 25 | }, 26 | all_versions: [ 27 | { 28 | version_name: 'v1.0', 29 | code_name: '', 30 | release_date: '' 31 | }, 32 | ], 33 | }, 34 | typing_descipline: ['dynamic', 'duck'], 35 | platform: ['{{unknown}}'], 36 | operating_system: ['{{unknown}}'], 37 | license: ['{{unknown}}'], 38 | examples: { 39 | hello_world: 'brave enough to put some code here? xD', 40 | }, 41 | }; 42 | 43 | module.exports = javascript; 44 | -------------------------------------------------------------------------------- /json/languages/Dart/Dart.js: -------------------------------------------------------------------------------- 1 | const Dart = { 2 | name: 'Dart', 3 | description_short: 'Dart is a client-optimized programming language for apps on multiple platforms', 4 | description: 'Dart is an open-source, general-purpose, object-oriented programming language with C-style syntax developed by Google in 2011. The purpose of Dart programming is to create a frontend user interfaces for the web and mobile apps. It is under active development, compiled to native machine code for building mobile apps, inspired by other programming languages such as Java, JavaScript, C#, and is Strongly Typed. Since Dart is a compiled language so you cannot execute your code directly; instead, the compiler parses it and transfer it into machine code.It supports most of the common concepts of programming languages like classes, interfaces, functions, unlike other programming languages. Dart language does not support arrays directly. It supports collection, which is used to replicate the data structure such as arrays, generics, and optional typing.', 5 | paradigm: ['object-oriented', 'class-based', 'garbage-collected'], 6 | developed_by: [ 7 | { 8 | name: 'Google', 9 | endpoint: '{{UNKNOWN}}', 10 | website: 'https://dart.dev/', 11 | twitter: 'https://twitter.com/dart_lang' 12 | } 13 | ], 14 | first_appeared: '2011-10-10', 15 | version: { 16 | current_stable: { 17 | version_name: 'Dart SDK', 18 | code_name: '2.8.4', 19 | release_data: '2020-06-03' 20 | }, 21 | upcoming_version: { 22 | version_name: 'Dart SDK 2.9', 23 | code_name: '2.9.0-8.2', 24 | expected_release_date: '{{UNKNOWN}}' 25 | }, 26 | all_versions: [ 27 | { 28 | version_name: '{{UNKNOWN}}', 29 | code_name: '{{UNKNOWN}}', 30 | release_date: '{{UNKNOWN}}' 31 | }, 32 | ], 33 | }, 34 | typing_discipline: ['{{UNKNOWN}}'], 35 | platform: ['{{unknown}}'], 36 | operating_system: ['Cross Platform'], 37 | license: ['BSD 3-Clause'], 38 | example_snippets: { 39 | hello_world: 'main(){ print(\'Hello world\');}' 40 | }, 41 | }; 42 | 43 | module.exports = Dart; 44 | -------------------------------------------------------------------------------- /json/languages/cpp/cpp.js: -------------------------------------------------------------------------------- 1 | const cpp = { 2 | name: "C-plus-plus", 3 | description_short: "C++ is a general-purpose programming language", 4 | description: 5 | 'C++ is a general-purpose programming language or also called as "C with classes". It is almost always implemented as a compiled language designed towards system programming with performance efficiency.', 6 | paradigm: ["generic", "functional", "procedural", "object-oriented"], 7 | developed_by: [ 8 | { 9 | name: "Bjarne Stroustrup", 10 | endpoint: "/developers/bjarne-stroustrup", 11 | website: "http://stroustrup.com/", 12 | twitter: "https://twitter.com/stroustrup", 13 | }, 14 | ], 15 | first_appeared: "1985", 16 | version: { 17 | current_stable: { 18 | version_name: "C++17, C++1z", 19 | code_name: "ISO/IEC 14882:2017", 20 | release_data: "01 December 2017", 21 | }, 22 | upcoming_version: { 23 | version_name: "C++20", 24 | code_name: "{{UNKNOWN}}", 25 | expected_release_date: "{{UNKNOWN}}", 26 | }, 27 | all_versions: [ 28 | { 29 | version_name: "C++98", 30 | code_name: "ISO/IEC 14882:1998", 31 | release_date: "October 1998", 32 | }, 33 | { 34 | version_name: "C++03", 35 | code_name: "ISO/IEC 14882:2003", 36 | release_date: "February 2003", 37 | }, 38 | { 39 | version_name: "C++11, C++0x", 40 | code_name: "ISO/IEC 14882:2011", 41 | release_date: "August 2011", 42 | }, 43 | { 44 | version_name: "C++14, C++1y", 45 | code_name: "ISO/IEC 14882:2014", 46 | release_date: "August 2014", 47 | }, 48 | ], 49 | }, 50 | typing_discipline: ["Static", "Nominative", "Partially inferred"], 51 | platform: ["Desktop", "Unreal Engine"], 52 | operating_system: ["Linux", "Windows", "Mac OS X", "Free BSD"], 53 | license: ["{{UNKNOWN}}"], 54 | example_snippets: { 55 | hello_world: `#include 56 | using namespace std; 57 | int main() { 58 | cout<<"Hello World"; 59 | return 0; 60 | }`, 61 | }, 62 | }; 63 | 64 | module.exports = cpp; 65 | -------------------------------------------------------------------------------- /json/languages/csharp/csharp.js: -------------------------------------------------------------------------------- 1 | const csharp = { 2 | name: 'C# or Csharp', 3 | description_short: 'C# (pronounced see sharp, like the musical note C♯, but written with the number sign) is a general-purpose programming discipline', 4 | description: 'C# is a general-purpose, multi-paradigm programming language encompassing strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.[17] It was developed around 2000 by Microsoft as part of its .NET initiative and later approved as an international standard by Ecma (ECMA-334) in 2002 and ISO (ISO/IEC 23270) in 2003. Mono is the name of the free and open-source project to develop a compiler and runtime for the language. C# is one of the programming languages designed for the Common Language Infrastructure (CLI)', 5 | paradigm: ['Structured', 'imperative', 'object-oriented', 'event-driven', 'task-driven', 'functional', 'generic', 'reflective', 'concurrent'], 6 | developed_by: [ 7 | { 8 | name: 'Anders Hejlsberg', 9 | endpoint: '/developers/anders-hejlsberg', 10 | website: '', 11 | twitter: 'https://twitter.com/ahejlsberg' 12 | } 13 | ], 14 | first_appeared: '2000', 15 | version: { 16 | current_stable: { 17 | version_name: 'C# 8', 18 | code_name: '', 19 | release_data: 'september 2019' 20 | }, 21 | upcoming_version: { 22 | version_name: 'C# 9', 23 | code_name: '', 24 | expected_release_date: '' 25 | }, 26 | all_versions: [ 27 | { 28 | version_name: 'C# 1', 29 | code_name: '', 30 | release_date: '' 31 | }, 32 | ], 33 | }, 34 | typing_discipline: ['Static', 'dynamic', 'strong', 'safe', 'nominative', 'partially inferred' 35 | ], 36 | platform: ['Common Language Infrastructure'], 37 | operating_system: ['all'], 38 | license: ['MIT/X11', 'GPLv3'], 39 | example_snippets: { 40 | hello_world: 'Console.WriteLine("Hello World!");', 41 | }, 42 | }; 43 | 44 | module.exports = csharp; -------------------------------------------------------------------------------- /json/languages/css/css.js: -------------------------------------------------------------------------------- 1 | const css = { 2 | name: "Cascading Style Sheets", 3 | description_short: 4 | "is a style sheet language used for describing the presentation of a document", 5 | description: 6 | "is a style sheet language used for describing the presentation of a document written in a markup language like HTML. CSS is a cornerstone technology of the World Wide Web, alongside HTML and JavaScript. CSS is designed to enable the separation of presentation and content, including layout, colors, and fonts", 7 | paradigm: ["Declarative", "Domain Specific"], 8 | developed_by: [ 9 | { 10 | names: "'Håkon Wium Lie', 'Bert Bos'", 11 | endpoint: "/developers/hakon-bert", 12 | website: [ 13 | "https://www.wiumlie.no/en.html", 14 | "https://www.w3.org/People/Bos/", 15 | ], 16 | }, 17 | ], 18 | first_appeared: "1996", 19 | version: { 20 | current_stable: { 21 | version_name: "CSS3", 22 | code_name: "Level 3", 23 | }, 24 | all_versions: [ 25 | { 26 | version_name: "CSS1", 27 | code_name: "Level 1", 28 | }, 29 | { 30 | version_name: "CSS2", 31 | code_name: "Level 2", 32 | }, 33 | { 34 | version_name: "CSS2.1", 35 | code_name: "Level 2 Revision 1", 36 | }, 37 | ], 38 | }, 39 | typing_discipline: ["Style Sheet language"], 40 | platform: ["Web"], 41 | operating_system: ["Linux", "Windows", "Mac OS X"], 42 | license: ["W3C"], 43 | example_snippets: { 44 | hello_world: 45 | '
Hello World
', 46 | }, 47 | }; 48 | 49 | module.exports = css; 50 | -------------------------------------------------------------------------------- /json/languages/go/go.js: -------------------------------------------------------------------------------- 1 | const go = { 2 | name: "GO", 3 | description_short: 4 | "Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.", 5 | description: 6 | "Go is a statically typed, compiled programming language designed at Google. Combines the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed and compiled one. It also aims to be modern, with support for networked and multicore computing.", 7 | paradigm: [ 8 | "classless", 9 | "object oriented", 10 | "cli tools environment", 11 | "structured", 12 | "imperative", 13 | ], 14 | developed_by: [ 15 | { 16 | name: "Robert Griesemer", 17 | endpoint: "/developers/robert-griesemer", 18 | website: "https://github.com/griesemer", 19 | twitter: "{{UNKNOWN}}", 20 | }, 21 | { 22 | name: "Rob Pike", 23 | endpoint: "/developers/rob-pike", 24 | website: "http://herpolhode.com/rob", 25 | twitter: "https://twitter.com/rob_pike", 26 | }, 27 | { 28 | name: "Ken Thompson", 29 | endpoint: "/developers/ken-thompson", 30 | website: "http://cs.bell-labs.co/who/ken", 31 | twitter: "{{UNKNOWN}}", 32 | }, 33 | ], 34 | first_appeared: "2012-03-28", 35 | version: { 36 | current_stable: { 37 | version_name: "1.14", 38 | code_name: "{{UNKNOWN}}", 39 | release_data: "2020-02", 40 | }, 41 | upcoming_version: { 42 | version_name: "1.15", 43 | code_name: "{{UNKNOWN}}", 44 | expected_release_date: "2020-07", 45 | }, 46 | all_versions: [ 47 | { 48 | version_name: "1.0", 49 | code_name: "{{UNKNOWN}}", 50 | release_date: "2012-03-28", 51 | }, 52 | { 53 | version_name: "1.1", 54 | code_name: "{{UNKNOWN}}", 55 | release_date: "2013-05-13", 56 | }, 57 | { 58 | version_name: "1.2", 59 | code_name: "{{UNKNOWN}}", 60 | release_date: "2013-12-01", 61 | }, 62 | { 63 | version_name: "1.3", 64 | code_name: "{{UNKNOWN}}", 65 | release_date: "2014-06-18", 66 | }, 67 | { 68 | version_name: "1.4", 69 | code_name: "{{UNKNOWN}}", 70 | release_date: "2014-12-10", 71 | }, 72 | { 73 | version_name: "1.5", 74 | code_name: "{{UNKNOWN}}", 75 | release_date: "2015-08-19", 76 | }, 77 | { 78 | version_name: "1.6", 79 | code_name: "{{UNKNOWN}}", 80 | release_date: "2016-02-17", 81 | }, 82 | { 83 | version_name: "1.7", 84 | code_name: "{{UNKNOWN}}", 85 | release_date: "2016-08-15", 86 | }, 87 | { 88 | version_name: "1.8", 89 | code_name: "{{UNKNOWN}}", 90 | release_date: "2017-02-16", 91 | }, 92 | { 93 | version_name: "1.9", 94 | code_name: "{{UNKNOWN}}", 95 | release_date: "2017-08-24", 96 | }, 97 | { 98 | version_name: "1.10", 99 | code_name: "{{UNKNOWN}}", 100 | release_date: "2018-02-16", 101 | }, 102 | { 103 | version_name: "1.11", 104 | code_name: "{{UNKNOWN}}", 105 | release_date: "2018-08-24", 106 | }, 107 | { 108 | version_name: "1.12", 109 | code_name: "{{UNKNOWN}}", 110 | release_date: "2019-02-25", 111 | }, 112 | { 113 | version_name: "1.13", 114 | code_name: "{{UNKNOWN}}", 115 | release_date: "2019-09-03", 116 | }, 117 | { 118 | version_name: "1.14", 119 | code_name: "{{UNKNOWN}}", 120 | release_date: "2020-02-25", 121 | }, 122 | ], 123 | }, 124 | typing_discipline: ["static", "typed"], 125 | platform: ["ALL"], 126 | operating_system: ["ALL"], 127 | license: ["BSD"], 128 | example_snippets: { 129 | hello_world: `package main 130 | 131 | import "fmt" 132 | 133 | func main() { 134 | fmt.Println("Hello, world!") 135 | }`, 136 | }, 137 | }; 138 | 139 | module.exports = go; 140 | -------------------------------------------------------------------------------- /json/languages/html/html.js: -------------------------------------------------------------------------------- 1 | const html = { 2 | name: 'Hypertext Markup Language', 3 | description_short: 'HTML is a markup language, used for structuring and presenting content on the World Wide Web', 4 | description: 'Hypertext Markup Language is the only way to describe how to render documents in the web browser. Consists of elements and attributes, which makes it easy to learn, read and extense', 5 | paradigm: ['{{UNKNOWN}}'], 6 | developed_by: [ 7 | { 8 | name: 'Tim Berners-Lee', 9 | endpoint: '/developers/tim-berners-lee', 10 | website: 'https://www.w3.org/People/Berners-Lee/', 11 | twitter: 'https://twitter.com/timberners_lee' 12 | } 13 | ], 14 | first_appeared: '1993', 15 | version: { 16 | current_stable: { 17 | version_name: 'HTML 5.2', 18 | code_name: '{{UNKNOWN}}', 19 | release_data: '2017-12-14' 20 | }, 21 | upcoming_version: { 22 | version_name: 'HTML.next', 23 | code_name: '{{UNKNOWN}}', 24 | expected_release_date: '{{UNKNOWN}}' 25 | }, 26 | all_versions: [ 27 | { 28 | version_name: 'HTML 1.0', 29 | code_name: '{{UNKNOWN}}', 30 | release_date: '1993' 31 | }, 32 | { 33 | version_name: 'HTML 2.0', 34 | code_name: '{{UNKNOWN}}', 35 | release_date: '1995-11-24' 36 | }, 37 | { 38 | version_name: 'HTML 3.2', 39 | code_name: 'Wilbur', 40 | release_date: '1996-09-12' 41 | }, 42 | { 43 | version_name: 'HTML 4.0', 44 | code_name: 'COUGUAR', 45 | release_date: '1997-12-18' 46 | }, 47 | { 48 | version_name: 'HTML 4.01', 49 | code_name: 'COUGUAR', 50 | release_date: '1999-12-24' 51 | }, 52 | { 53 | version_name: 'HTML 5.0', 54 | code_name: '{{UNKNOWN}}', 55 | release_date: '2014-10-2+' 56 | }, 57 | { 58 | version_name: 'HTML 5.1', 59 | code_name: '{{UNKNOWN}}', 60 | release_date: '2016-11-01' 61 | }, 62 | { 63 | version_name: 'HTML 5.2', 64 | code_name: '{{UNKNOWN}}', 65 | release_date: '2017-12-14' 66 | }, 67 | ], 68 | }, 69 | typing_discipline: ['{{UNKNOWN}}'], 70 | platform: ['{{unknown}}'], 71 | operating_system: ['{{unknown}}'], 72 | license: ['{{unknown}}'], 73 | example_snippets: { 74 | hello_world: ` 75 | 76 | 77 | 78 | This is a title 79 | 80 | 81 |

Hello world!

82 | 83 | `, 84 | }, 85 | }; 86 | 87 | module.exports = html; -------------------------------------------------------------------------------- /json/languages/java/java.js: -------------------------------------------------------------------------------- 1 | const java = { 2 | name: 'Java', 3 | description_short: 'Java is a high-level object-oriented programming language developed by Sun Microsystems.', 4 | description: 'Java is a general-purpose programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible. It is intended to let application developers write once, run anywhere, meaning that compiled Java code can run on all platforms that support Java without the need for recompilation.', 5 | paradigm: ['functional', 'imperative', 'object-oriented'], 6 | developed_by: [ 7 | { 8 | name: "James Gosling", 9 | endpoint: "/developers/james-gosling", 10 | website: "http://nighthacks.com/jag/blog/400/index.html", 11 | twitter: "https://twitter.com/errcraft" 12 | } 13 | ], 14 | first_appeared: '1995-05-23', 15 | version: { 16 | current_stable: { 17 | version_name: 'Java SE 14', 18 | code_name: '{{UNKNOWN}}', 19 | release_data: "March 2020" 20 | }, 21 | upcoming_version: { 22 | version_name: "Java SE 15", 23 | code_name: "{{UNKNOWN}}", 24 | expected_release_date: "September 2020" 25 | }, 26 | all_versions: [ 27 | { 28 | version_name: 'JDK Beta', 29 | code_name: '{{UNKNOWN}}', 30 | release_date: '1995' 31 | }, 32 | { 33 | version_name: 'JDK 1.0', 34 | code_name: '{{UNKNOWN}}', 35 | release_date: 'January 1996' 36 | }, 37 | { 38 | version_name: 'JDK 1.1', 39 | code_name: '{{UNKNOWN}}', 40 | release_date: 'February 1997' 41 | }, 42 | { 43 | version_name: 'J2SE 1.2', 44 | code_name: '{{UNKNOWN}}', 45 | release_date: 'December 1998' 46 | }, 47 | { 48 | version_name: 'J2SE 1.3', 49 | code_name: '{{UNKNOWN}}', 50 | release_date: 'May 2000' 51 | }, 52 | { 53 | version_name: 'J2SE 1.4', 54 | code_name: '{{UNKNOWN}}', 55 | release_date: 'February 2002' 56 | }, 57 | { 58 | version_name: 'J2SE 5.0', 59 | code_name: '{{UNKNOWN}}', 60 | release_date: 'September 2004' 61 | }, 62 | { 63 | version_name: 'Java SE 6', 64 | code_name: '{{UNKNOWN}}', 65 | release_date: 'SDecember 2006' 66 | }, 67 | { 68 | version_name: 'Java SE 7', 69 | code_name: '{{UNKNOWN}}', 70 | release_date: 'July 2011' 71 | }, 72 | { 73 | version_name: 'Java SE 8 (LTS)', 74 | code_name: '{{UNKNOWN}}', 75 | release_date: 'March 2014' 76 | }, 77 | { 78 | version_name: 'Java SE 9', 79 | code_name: '{{UNKNOWN}}', 80 | release_date: 'September 2017' 81 | }, 82 | { 83 | version_name: 'Java SE 10', 84 | code_name: '{{UNKNOWN}}', 85 | release_date: 'March 2018' 86 | }, 87 | { 88 | version_name: 'Java SE 11 (LTS)', 89 | code_name: '{{UNKNOWN}}', 90 | release_date: 'September 2018' 91 | }, 92 | { 93 | version_name: 'Java SE 12', 94 | code_name: '{{UNKNOWN}}', 95 | release_date: 'March 2019' 96 | }, 97 | { 98 | version_name: 'Java SE 13', 99 | code_name: '{{UNKNOWN}}', 100 | release_date: 'September 2019' 101 | }, 102 | { 103 | version_name: 'Java SE 14', 104 | code_name: '{{UNKNOWN}}', 105 | release_date: 'March 2020' 106 | }, 107 | ], 108 | }, 109 | typing_discipline: ['static', 'strong', 'safe', 'nominative', 'manifest'], 110 | platform: ['cross-platform'], 111 | operating_system: ['all'], 112 | license: ['open standard'], 113 | examples: { 114 | hello_world: 'public class Hello {\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println("Hello World!");\n\t}\n}', 115 | }, 116 | }; 117 | 118 | module.exports = java; 119 | -------------------------------------------------------------------------------- /json/languages/javascript/javascript.js: -------------------------------------------------------------------------------- 1 | const javascript = { 2 | name: 'Javascript', 3 | description_short: 'JavaScript is a programming language that conforms to the ECMAScript specification.', 4 | description: 'JavaScript, often abbreviated as JS, is a programming language that conforms to the ECMAScript specification. JavaScript is high-level, often just-in-time compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.', 5 | paradigm: ['event-driven', 'functional', 'imperative'], 6 | developed_by: [ 7 | { 8 | name: "Brendan Eich", 9 | endpoint: "/developers/brendan-eich", 10 | website: "https://brendaneich.com/", 11 | twitter: "https://twitter.com/BrendanEich" 12 | } 13 | ], 14 | first_appeared: '1995-12-04', 15 | version: { 16 | current_stable: { 17 | version_name: 'ECMASCRIPT 2019', 18 | code_name: 'ES19', 19 | release_data: "June 2019" 20 | }, 21 | upcoming_version: { 22 | version_name: "ECMASCRIPT 2020", 23 | code_name: "ES20", 24 | expected_release_date: "TBC" 25 | }, 26 | all_versions: [ 27 | { 28 | version_name: 'v1.0', 29 | code_name: '', 30 | release_date: '' 31 | }, 32 | ], 33 | }, 34 | typing_discipline: ['dynamic', 'duck'], 35 | platform: ['cross-platform'], 36 | operating_system: ['all'], 37 | license: ['open standard'], 38 | examples: { 39 | hello_world: 'alert("Hello World")', 40 | }, 41 | }; 42 | 43 | module.exports = javascript; 44 | -------------------------------------------------------------------------------- /json/languages/kotlin/kotlin.js: -------------------------------------------------------------------------------- 1 | const kotlin = { 2 | name: "Kotlin", 3 | description_short: 4 | "Kotlin is a modern, cross-platform, multi-purpose programming language", 5 | description: 6 | "Kotlin is a cross-platform, multi-purpose modern programming language. Knownfor its concise syntax and pragmatic design, Kotlin provides ample opportunitiesfor code-sharing and code-reuse between multiple projects on multiple platforms,for productive concurrent programming.", 7 | paradigm: ["functional", "object-oriented"], 8 | developed_by: [ 9 | { 10 | name: "JetBrains", 11 | endpoint: "https://www.jetbrains.com/", 12 | website: "https://kotlinlang.org/", 13 | twitter: "https://twitter.com/kotlin", 14 | }, 15 | ], 16 | first_appeared: "2011", 17 | version: { 18 | current_stable: { 19 | version_name: "Kotlin 1.3.72", 20 | code_name: "{{UNKNOWN}}", 21 | release_data: "April 15, 2020", 22 | }, 23 | upcoming_version: { 24 | version_name: "Kotlin 1.4-M2", 25 | code_name: "{{UNKNOWN}}", 26 | expected_release_date: "June 4, 2020", 27 | }, 28 | all_versions: [ 29 | { 30 | version_name: "{{UNKNOWN}}", 31 | code_name: "{{UNKNOWN}}", 32 | release_date: "{{UNKNOWN}}", 33 | }, 34 | ], 35 | }, 36 | typing_discipline: ["inferred", "static", "strong"], 37 | platform: ["JVM", "JavaScript", "LLVM"], 38 | operating_system: ["Cross-platform"], 39 | license: ["Apache License 2.0"], 40 | example_snippets: { 41 | hello_world: 'fun main(args: Array) { println("Hello World!") }', 42 | }, 43 | }; 44 | 45 | module.exports = kotlin; 46 | -------------------------------------------------------------------------------- /json/languages/python/python.js: -------------------------------------------------------------------------------- 1 | const python = { 2 | name: 'Python', 3 | description_short: 'Python is an interpreted, high-level programming language', 4 | description: 'Python is an interpreted, high-level, general-purpose programming language. Python is often described as a "batteries included" language due to its comprehensive standard library', 5 | paradigm: ['imperative', 'functional', 'procedural', 'object-oriented'], 6 | developed_by: [ 7 | { 8 | name: 'Guido van Rossum', 9 | endpoint: '/developers/Guido-van-Rossum', 10 | website: 'https://gvanrossum.github.io/', 11 | twitter: 'https://twitter.com/gvanrossum' 12 | } 13 | ], 14 | first_appeared: '1990', 15 | version: { 16 | current_stable: { 17 | version_name: 'Python 3.8.3', 18 | code_name: '{{UNKNOWN}}', 19 | release_data: '13 May 2020' 20 | }, 21 | upcoming_version: { 22 | version_name: 'Python 4.0', 23 | code_name: '{{UNKNOWN}}', 24 | expected_release_date: '{{UNKNOWN}}' 25 | }, 26 | all_versions: [ 27 | { 28 | version_name: 'Python 1.4', 29 | code_name: '{{UNKNOWN}}', 30 | release_date: '25 October 1996' 31 | }, 32 | { 33 | version_name: 'Python 1.5', 34 | code_name: '{{UNKNOWN}}', 35 | release_date: '17 February 1998' 36 | }, 37 | { 38 | version_name: 'Python 1.5.1', 39 | code_name: '{{UNKNOWN}}', 40 | release_date: '14 April 1998' 41 | }, 42 | { 43 | version_name: 'Python 1.5.1p1', 44 | code_name: '{{UNKNOWN}}', 45 | release_date: '6 August 1998' 46 | } 47 | ] 48 | }, 49 | typing_discipline: ['duck', 'dynamic', 'gradual'], 50 | platform: ['Web', 'Desktop'], 51 | operating_system: ['{{unknown}}'], 52 | license: ['PSFL'], 53 | example_snippets: { 54 | hello_world: 'print("hello world!")' 55 | } 56 | } 57 | 58 | module.exports = python 59 | -------------------------------------------------------------------------------- /json/languages/rust/rust.js: -------------------------------------------------------------------------------- 1 | const rust = { 2 | name: "Rust", 3 | description_short: 4 | "A language empowering everyone to build reliable and efficient software.", 5 | description: 6 | "Rust is a multi-paradigm programming language focused on performance and safety, especially safe concurrency. With no runtime or garbage collector, Rust is syntactically similar to C++, and provides memory safety, thread-safety and a friendly compiler.", 7 | paradigm: ["concurrent", "functional", "generic", "imperative", "structured"], 8 | developed_by: [ 9 | { 10 | name: "Graydon Hoare", 11 | endpoint: "developers/graydon-hoare", 12 | website: "https://github.com/graydon", 13 | twitter: "https://twitter.com/graydon_pub", 14 | }, 15 | ], 16 | first_appeared: "2010-07-07", 17 | version: { 18 | current_stable: { 19 | version_name: "1.44.0", 20 | code_name: "{{UNKNOWN}}", 21 | release_data: "2020-06-01", 22 | }, 23 | upcoming_version: { 24 | version_name: "{{UNKNOWN}}", 25 | code_name: "{{UNKNOWN}}", 26 | expected_release_date: "{{UNKNOWN}}", 27 | }, 28 | all_versions: [ 29 | { 30 | version_name: "Rust 1.44.0", 31 | code_name: "{{UNKNOWN}}", 32 | release_date: "2020-06-04", 33 | }, 34 | { 35 | version_name: "Rust 1.43.1", 36 | code_name: "{{UNKNOWN}}", 37 | release_date: "2020-05-07", 38 | }, 39 | { 40 | version_name: "Rust 1.43.0", 41 | code_name: "{{UNKNOWN}}", 42 | release_date: "2020-04-23", 43 | }, 44 | { 45 | version_name: "Rust 1.42.0", 46 | code_name: "{{UNKNOWN}}", 47 | release_date: "2020-03-12", 48 | }, 49 | { 50 | version_name: "Rust 1.41.1", 51 | code_name: "{{UNKNOWN}}", 52 | release_date: "2020-02-27", 53 | }, 54 | { 55 | version_name: "Rust 1.41.0", 56 | code_name: "{{UNKNOWN}}", 57 | release_date: "2020-01-30", 58 | }, 59 | { 60 | version_name: "Rust 1.40.0", 61 | code_name: "{{UNKNOWN}}", 62 | release_date: "2019-12-19", 63 | }, 64 | { 65 | version_name: "Rust 1.39.0", 66 | code_name: "{{UNKNOWN}}", 67 | release_date: "2019-11-07", 68 | }, 69 | { 70 | version_name: "Rust 1.38.0", 71 | code_name: "{{UNKNOWN}}", 72 | release_date: "2019-09-26", 73 | }, 74 | { 75 | version_name: "Rust 1.37.0", 76 | code_name: "{{UNKNOWN}}", 77 | release_date: "2019-08-15", 78 | }, 79 | { 80 | version_name: "Rust 1.36.0", 81 | code_name: "{{UNKNOWN}}", 82 | release_date: "2019-07-04", 83 | }, 84 | { 85 | version_name: "Rust 1.35.0", 86 | code_name: "{{UNKNOWN}}", 87 | release_date: "2019-05-23", 88 | }, 89 | { 90 | version_name: "Rust 1.34.2", 91 | code_name: "{{UNKNOWN}}", 92 | release_date: "2019-05-14", 93 | }, 94 | { 95 | version_name: "Rust 1.34.1", 96 | code_name: "{{UNKNOWN}}", 97 | release_date: "2019-04-25", 98 | }, 99 | { 100 | version_name: "Rust 1.34.0", 101 | code_name: "{{UNKNOWN}}", 102 | release_date: "2019-04-11", 103 | }, 104 | { 105 | version_name: "Rust 1.33.0", 106 | code_name: "{{UNKNOWN}}", 107 | release_date: "2019-02-28", 108 | }, 109 | { 110 | version_name: "Rust 1.32.0", 111 | code_name: "{{UNKNOWN}}", 112 | release_date: "2019-01-17", 113 | }, 114 | { 115 | version_name: "Rust 1.31.1", 116 | code_name: "{{UNKNOWN}}", 117 | release_date: "2018-12-20", 118 | }, 119 | { 120 | version_name: "Rust 1.31.0", 121 | code_name: "{{UNKNOWN}}", 122 | release_date: "2018-12-06", 123 | }, 124 | { 125 | version_name: "Rust 1.30.1", 126 | code_name: "{{UNKNOWN}}", 127 | release_date: "2018-11-08", 128 | }, 129 | { 130 | version_name: "Rust 1.30.0", 131 | code_name: "{{UNKNOWN}}", 132 | release_date: "2018-10-25", 133 | }, 134 | { 135 | version_name: "Rust 1.29.2", 136 | code_name: "{{UNKNOWN}}", 137 | release_date: "2018-10-11", 138 | }, 139 | { 140 | version_name: "Rust 1.29.1", 141 | code_name: "{{UNKNOWN}}", 142 | release_date: "2018-09-25", 143 | }, 144 | { 145 | version_name: "Rust 1.29.0", 146 | code_name: "{{UNKNOWN}}", 147 | release_date: "2018-09-13", 148 | }, 149 | { 150 | version_name: "Rust 1.28.0", 151 | code_name: "{{UNKNOWN}}", 152 | release_date: "2018-08-02", 153 | }, 154 | { 155 | version_name: "Rust 1.27.2", 156 | code_name: "{{UNKNOWN}}", 157 | release_date: "2018-07-20", 158 | }, 159 | { 160 | version_name: "Rust 1.27.1", 161 | code_name: "{{UNKNOWN}}", 162 | release_date: "2018-07-10", 163 | }, 164 | { 165 | version_name: "Rust 1.27.0", 166 | code_name: "{{UNKNOWN}}", 167 | release_date: "2018-06-21", 168 | }, 169 | { 170 | version_name: "Rust 1.26.2", 171 | code_name: "{{UNKNOWN}}", 172 | release_date: "2018-06-05", 173 | }, 174 | { 175 | version_name: "Rust 1.26.1", 176 | code_name: "{{UNKNOWN}}", 177 | release_date: "2018-05-29", 178 | }, 179 | { 180 | version_name: "Rust 1.26.0", 181 | code_name: "{{UNKNOWN}}", 182 | release_date: "2018-05-10", 183 | }, 184 | { 185 | version_name: "Rust 1.25.0", 186 | code_name: "{{UNKNOWN}}", 187 | release_date: "2018-03-29", 188 | }, 189 | { 190 | version_name: "Rust 1.24.1", 191 | code_name: "{{UNKNOWN}}", 192 | release_date: "2018-03-01", 193 | }, 194 | { 195 | version_name: "Rust 1.24.0", 196 | code_name: "{{UNKNOWN}}", 197 | release_date: "2018-02-15", 198 | }, 199 | { 200 | version_name: "Rust 1.23.0", 201 | code_name: "{{UNKNOWN}}", 202 | release_date: "2018-01-04", 203 | }, 204 | { 205 | version_name: "Rust 1.22.1", 206 | code_name: "{{UNKNOWN}}", 207 | release_date: "2017-11-22", 208 | }, 209 | { 210 | version_name: "Rust 1.22.0", 211 | code_name: "{{UNKNOWN}}", 212 | release_date: "2017-11-22", 213 | }, 214 | { 215 | version_name: "Rust 1.21.0", 216 | code_name: "{{UNKNOWN}}", 217 | release_date: "2017-10-12", 218 | }, 219 | { 220 | version_name: "Rust 1.20.0", 221 | code_name: "{{UNKNOWN}}", 222 | release_date: "2017-08-31", 223 | }, 224 | { 225 | version_name: "Rust 1.19.0", 226 | code_name: "{{UNKNOWN}}", 227 | release_date: "2017-07-20", 228 | }, 229 | { 230 | version_name: "Rust 1.18.0", 231 | code_name: "{{UNKNOWN}}", 232 | release_date: "2017-06-08", 233 | }, 234 | { 235 | version_name: "Rust 1.17.0", 236 | code_name: "{{UNKNOWN}}", 237 | release_date: "2017-04-27", 238 | }, 239 | { 240 | version_name: "Rust 1.16.0", 241 | code_name: "{{UNKNOWN}}", 242 | release_date: "2017-03-16", 243 | }, 244 | { 245 | version_name: "Rust 1.15.1", 246 | code_name: "{{UNKNOWN}}", 247 | release_date: "2017-02-09", 248 | }, 249 | { 250 | version_name: "Rust 1.15.0", 251 | code_name: "{{UNKNOWN}}", 252 | release_date: "2017-02-02", 253 | }, 254 | { 255 | version_name: "Rust 1.14.0", 256 | code_name: "{{UNKNOWN}}", 257 | release_date: "2016-12-22", 258 | }, 259 | { 260 | version_name: "Rust 1.13.0", 261 | code_name: "{{UNKNOWN}}", 262 | release_date: "2016-11-10", 263 | }, 264 | { 265 | version_name: "Rust 1.12.1", 266 | code_name: "{{UNKNOWN}}", 267 | release_date: "2016-10-20", 268 | }, 269 | { 270 | version_name: "Rust 1.12.0", 271 | code_name: "{{UNKNOWN}}", 272 | release_date: "2016-09-29", 273 | }, 274 | { 275 | version_name: "Rust 1.11.0", 276 | code_name: "{{UNKNOWN}}", 277 | release_date: "2016-08-18", 278 | }, 279 | { 280 | version_name: "Rust 1.10.0", 281 | code_name: "{{UNKNOWN}}", 282 | release_date: "2016-07-07", 283 | }, 284 | { 285 | version_name: "Rust 1.9.0", 286 | code_name: "{{UNKNOWN}}", 287 | release_date: "2016-05-26", 288 | }, 289 | { 290 | version_name: "Rust 1.8.0", 291 | code_name: "{{UNKNOWN}}", 292 | release_date: "2016-04-14", 293 | }, 294 | { 295 | version_name: "Rust 1.7.0", 296 | code_name: "{{UNKNOWN}}", 297 | release_date: "2016-03-03", 298 | }, 299 | { 300 | version_name: "Rust 1.6.0", 301 | code_name: "{{UNKNOWN}}", 302 | release_date: "2016-01-21", 303 | }, 304 | { 305 | version_name: "Rust 1.5.0", 306 | code_name: "{{UNKNOWN}}", 307 | release_date: "2015-12-10", 308 | }, 309 | { 310 | version_name: "Rust 1.4.0", 311 | code_name: "{{UNKNOWN}}", 312 | release_date: "2015-10-29", 313 | }, 314 | { 315 | version_name: "Rust 1.3.0", 316 | code_name: "{{UNKNOWN}}", 317 | release_date: "2015-09-17", 318 | }, 319 | { 320 | version_name: "Rust 1.2.0", 321 | code_name: "{{UNKNOWN}}", 322 | release_date: "2015-08-07", 323 | }, 324 | { 325 | version_name: "Rust 1.1.0", 326 | code_name: "{{UNKNOWN}}", 327 | release_date: "2015-06-25", 328 | }, 329 | { 330 | version_name: "Rust 1.0.0", 331 | code_name: "{{UNKNOWN}}", 332 | release_date: "2015-05-15", 333 | }, 334 | { 335 | version_name: "Rust 1.0.0", 336 | code_name: "alpha.2", 337 | release_date: "2015-02-20", 338 | }, 339 | { 340 | version_name: "Rust 1.0.0", 341 | code_name: "alpha", 342 | release_date: "2015-01-09", 343 | }, 344 | { 345 | version_name: "Rust 0.12.0", 346 | code_name: "{{UNKNOWN}}", 347 | release_date: "2014-10-09", 348 | }, 349 | { 350 | version_name: "Rust 0.11.0", 351 | code_name: "{{UNKNOWN}}", 352 | release_date: "2014-07-02", 353 | }, 354 | ], 355 | }, 356 | typing_discipline: ["inferred", "affine", "nominal", "static", "strong"], 357 | platform: ["ARM", "IA-32", "x86-64", "MIPS", "PowerPC", "SPARC", "RISC-V"], 358 | operating_system: [ 359 | "Linux", 360 | "macOS", 361 | "Windows", 362 | "FreeBSD", 363 | "OpenBSD", 364 | "Redox", 365 | "Android", 366 | "iOS", 367 | ], 368 | license: ["MIT", "Apache 2.0"], 369 | example_snippets: { 370 | hello_world: 'fn main() { println!("Hello World!"); }', 371 | }, 372 | }; 373 | 374 | module.exports = rust; 375 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "API-Structure", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "repository": "https://github.com/zeroDevs/API-Structure.git", 6 | "author": "Ankur Anant ", 7 | "license": "MIT", 8 | "scripts": { 9 | "start": "node app.js", 10 | "dev": "nodemon app.js", 11 | "test": "jest" 12 | }, 13 | "dependencies": { 14 | "body-parser": "^1.19.0", 15 | "cors": "^2.8.5", 16 | "express": "^4.17.1", 17 | "express-handlebars": "^4.0.4", 18 | "handlebars": "^4.7.7" 19 | }, 20 | "devDependencies": { 21 | "jest": "^26.0.1", 22 | "nodemon": "^2.0.4" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/framework.test.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | let frameworkFilesArray = fs.readdirSync(path.join(__dirname, "../json/frameworks")); 5 | 6 | for(let i=0; i { 11 | it('check json', () => { 12 | const parseJson = () => { 13 | const json = JSON.stringify(currentFramework); 14 | JSON.parse(json); 15 | }; 16 | expect(parseJson).not.toThrow(); 17 | }) 18 | 19 | describe('string value test', () => { 20 | it('Framework name', async () => { 21 | await expect(currentFramework.name.length).toBeGreaterThan(0) 22 | }) 23 | it('Framework short description', async () => { 24 | await expect(currentFramework.description_short.length).toBeGreaterThan(0) 25 | }) 26 | it('Framework description', async () => { 27 | await expect(currentFramework.description.length).toBeGreaterThan(0) 28 | }) 29 | it('Framework developer', async () => { 30 | await expect(currentFramework.developed_by.length).toBeGreaterThan(0) 31 | }) 32 | }) 33 | 34 | }) 35 | } 36 | -------------------------------------------------------------------------------- /tests/language.test.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | 4 | let langFilesArray = fs.readdirSync(path.join(__dirname, "../json/languages")); 5 | 6 | for(let i=0; i { 11 | it('check json', () => { 12 | const parseJson = () => { 13 | const json = JSON.stringify(currentLang); 14 | JSON.parse(json); 15 | }; 16 | expect(parseJson).not.toThrow(); 17 | }) 18 | 19 | describe('string value test', () => { 20 | it('Language name', async () => { 21 | await expect(currentLang.name.length).toBeGreaterThan(0) 22 | }) 23 | it('Language short description', async () => { 24 | await expect(currentLang.description_short.length).toBeGreaterThan(0) 25 | }) 26 | it('Language description', async () => { 27 | await expect(currentLang.description.length).toBeGreaterThan(0) 28 | }) 29 | it('Language paradigm', async () => { 30 | await expect(currentLang.paradigm.length).toBeGreaterThan(0) 31 | }) 32 | it('Language developer', async () => { 33 | await expect(currentLang.developed_by.length).toBeGreaterThan(0) 34 | }) 35 | it('First Appearance', async () => { 36 | await expect(currentLang.first_appeared.length).toBeGreaterThan(0) 37 | }) 38 | it('Typing Discipline', async () => { 39 | await expect(currentLang.typing_discipline.length).toBeGreaterThan(0) 40 | }) 41 | it('Platform', async () => { 42 | await expect(currentLang.platform.length).toBeGreaterThan(0) 43 | }) 44 | it('Operating System Supported', async () => { 45 | await expect(currentLang.operating_system.length).toBeGreaterThan(0) 46 | }) 47 | it('License', async () => { 48 | await expect(currentLang.license.length).toBeGreaterThan(0) 49 | }) 50 | }) 51 | 52 | }) 53 | } 54 | -------------------------------------------------------------------------------- /v1/frameworks/frameworks.route.js: -------------------------------------------------------------------------------- 1 | const route = require("express").Router(); 2 | 3 | route.get("/:framework", (req, res) => { 4 | console.log(req.params) 5 | const currentFramework = require(`../../json/framework/${req.params.frameworks}/${req.params.framework}`); 6 | res.send(currentFramework) 7 | }); 8 | 9 | module.exports = route; -------------------------------------------------------------------------------- /v1/index.js: -------------------------------------------------------------------------------- 1 | const route = require("express").Router(); 2 | 3 | const languageRoute = require("./languages/languages.route"); 4 | const frameworkRoute = require("./frameworks/frameworks.route"); 5 | 6 | route.use("/languages", languageRoute); 7 | route.use("/framework", frameworkRoute); 8 | 9 | route.get("/", (_, res) => { 10 | res.render("index.handlebars", { 11 | endpoints: [ 12 | { 13 | method: "GET", 14 | endpoint: "api/v1/languages/:language", 15 | desc: "Endpoint for language data", 16 | note: "Null", 17 | }, 18 | { 19 | method: "GET", 20 | endpoint: "api/v1/languages/:language/features/:feature", 21 | desc: "Endpoint for login", 22 | note: "Will be added soon...", 23 | }, 24 | ], 25 | }); 26 | }); 27 | 28 | module.exports = route; 29 | -------------------------------------------------------------------------------- /v1/languages/cpp/arrays.js: -------------------------------------------------------------------------------- 1 | const Arrays = { 2 | name: "Arrays", 3 | description: 4 | "Like other programming languages, array in C++ is a group of similar types of elements that have contiguous memory location.In C++ std::array is a container that encapsulates fixed size arrays. In C++, array index starts from 0. We can store only fixed set of elements in C++ array.", 5 | syntax: "type variable_name[size_of_array]", 6 | example: "int arr[5]; int arr[3] = {1, 2, 3};", 7 | notes: [ 8 | { 9 | note_1: 10 | "Arrays have 0 as the first index not 1. for example, arr[0] is the first element.", 11 | }, 12 | { 13 | note_2: 14 | "If the size of an array is 'n', to access the last element, (n-1) index is used. for example, arr[n-1] is the last element.", 15 | }, 16 | { 17 | note_3: 18 | "Suppose the starting address of arr[0] is 2120d. Then, the next address, arr[1], will be 2124d, address of arr[2] will be 2128d and so on. It's because the size of int is 4 bytes.", 19 | }, 20 | ], 21 | }; 22 | 23 | module.exports = Arrays; 24 | -------------------------------------------------------------------------------- /v1/languages/cpp/basic-inputs-and-outputs.js: -------------------------------------------------------------------------------- 1 | const BasicInputsAndOutputs = { 2 | name: "Basic Inputs and Outputs", 3 | description: 4 | 'C++ uses streams for inputs and outputs, which is an abstraction allowing to insert characters or extract characters from it. The insertion operator "<<" is used for the output and the extraction operator ">>" is used for the input.', 5 | example: 'cout << "Hello World; cin >> inputVariable', 6 | methods: [ 7 | { 8 | name: "cout", 9 | description: "Standard output stream", 10 | example: 'cout << "Hello World"; // prints Hello World on screen', 11 | }, 12 | { 13 | name: "cin", 14 | description: "Standard input stream", 15 | example: 16 | '// i/o example\n#include \nusing namespace std;\nint main ()\n{\nint i;\ncout << "Please enter an integer value: ";\ncin >> i;\ncout << "The value you entered is " << i;\n//Will ask the user to enter integer value and then it will print it out on the screen.', 17 | }, 18 | ], 19 | }; 20 | 21 | module.exports = BasicInputsAndOutputs; 22 | -------------------------------------------------------------------------------- /v1/languages/cpp/basics.js: -------------------------------------------------------------------------------- 1 | const Basics = { 2 | name: "Structure of a program", 3 | description: 4 | "C++ programs start with a header containing directives, beginning with a hashtag, an int main() function and the body of the program inside curly braces.", 5 | example: 6 | '// this is my first program in C++ \n#include \nint main()\n{\nstd::cout << "Hello World!";\n}', 7 | methods: [ 8 | { 9 | name: "comments", 10 | description: "Comments are preceded by two slash.", 11 | example: "// this is my first program in C++", 12 | }, 13 | { 14 | name: "directives", 15 | description: 16 | "Read and interpreted by the preprocessor, before compilation. In the following example, the directive is to include part of the C++ library which will bring the input output operators available to the program.", 17 | example: "#include ", 18 | }, 19 | { 20 | name: "declaration", 21 | description: 22 | "The main function is declared, which is the body of the program. The syntax follows a type/name/parentheses with optional parameters.", 23 | example: "int main()", 24 | }, 25 | { 26 | name: "curly braces", 27 | description: 28 | "The { marks the beginning of the function and the } marks the end of it. The instructions in between will be run when the program starts.", 29 | example: '{\nstd::cout << "Hello World!";\n}', 30 | }, 31 | ], 32 | }; 33 | 34 | module.exports = Basics; 35 | -------------------------------------------------------------------------------- /v1/languages/cpp/compilers.js: -------------------------------------------------------------------------------- 1 | const Compilers = { 2 | name: "Compilers.", 3 | description: 4 | "A compiler will translate the code to a set of intructions in machine language. There are a lot of C++ compilers. For a complete list, refer to: https://en.wikipedia.org/wiki/List_of_compilers#C++_compilers.", 5 | example: 6 | "A single instruction to a computer could look like: \n00000 10011110", 7 | compilers: [ 8 | { 9 | name: "GCC", 10 | description: 11 | "Stands fro the GNU Compiler Collection and consists of a compiler system produced by the GNU Project supporting various programming languages.", 12 | example: "g++ -std=c++0x helloworld.cpp -o helloworld_program", 13 | }, 14 | { 15 | name: "Clang", 16 | description: 17 | "Compiler front end for the C, C++, Objective-C and Objective-C++ programming languages, as well as for some others. It uses the LLVM compiler infrastructure as its back end.", 18 | example: 19 | "clang++ -std=c++11 -stdlib=libc++ helloworld.cpp -o helloworld_program", 20 | }, 21 | { 22 | name: "Visual C++", 23 | description: 24 | "The Visual C++ compiler is still known as Microsoft C/C++ and is part of the integrated development environment (IDE) product from Microsoft for the C, C++, and C++/CLI programming languages.", 25 | example: 26 | "To build a C++ project in Vsual Studio, choose Build Solution from the Build menu.", 27 | }, 28 | ], 29 | }; 30 | 31 | module.exports = Compilers; 32 | -------------------------------------------------------------------------------- /v1/languages/cpp/constants.js: -------------------------------------------------------------------------------- 1 | const Constants = { 2 | name: "Constants", 3 | description: "Constants are expressions that have a fixed value.", 4 | example: "const double pi = 3.1415926", 5 | methods: [ 6 | { 7 | name: "Literals", 8 | description: 9 | "The most obvious kind of constants. There can be integer, floating-point, characters, strings, Boolean, pointers, and user-defined literals.", 10 | example: '1776, 3.14159, "Hello world"', 11 | }, 12 | { 13 | name: "Typed constant expressions", 14 | description: 15 | "When you want to give a name to a constant value, you prefix it with the const reserved word. You can then use the named constant later on in your program.", 16 | example: "const double pi = 3.1415926;", 17 | }, 18 | { 19 | name: "Preprocessor definitions (#define)", 20 | description: 21 | 'You can use a preprocessor definition, at the top of your program, above the main() function, by using the reserved keyword "define" preceded with a hastag. You then name the constant, capitalized by convention, and assign it a value, without the equal sign.', 22 | example: "#define PI 3.141559", 23 | }, 24 | ], 25 | }; 26 | 27 | module.exports = Constants; 28 | -------------------------------------------------------------------------------- /v1/languages/cpp/dataTypes.js: -------------------------------------------------------------------------------- 1 | const DataTypes = { 2 | name: "Data-Types", 3 | desription: 4 | "A data type specifies the type of data that a variable can store such as integer, floating, character etc.", 5 | types: [ 6 | { 7 | name: "Basic data-types", 8 | example: ["int", "float", "char", "double"], 9 | }, 10 | { 11 | name: "Derived data-types", 12 | example: ["array", "pointer", "function", "references"], 13 | }, 14 | { 15 | name: "Enumeration data-types", 16 | example: ["enum"], 17 | }, 18 | { 19 | name: "User defined data-type", 20 | example: ["class", "structure"], 21 | }, 22 | ], 23 | example: `int x = 45; double y = 100.00;`, 24 | }; 25 | 26 | module.exports = DataTypes; 27 | -------------------------------------------------------------------------------- /v1/languages/cpp/functions.js: -------------------------------------------------------------------------------- 1 | const Functions = { 2 | name: "Functions", 3 | description: 4 | "In c++ functions have a return type (it's a keyword), function name and arguments to be passed with their data_type. Their lifecycle consists of funciton calling and function definition. Fucntion declaration just tells the compiler about the return type, name of function and types of arguments to be accepted. In C++ we can pass multiple argumetns to a function. Function call have actual arguments whereas function definition have formal arguments. They maintain modularity in our code and decreases the code length.", 5 | syntax: { 6 | declaration: 7 | "return_type function_name(data_type_of_arg1,data_type_of_arg2);", 8 | call: "function_name(arg1,arg2);", 9 | definition: 10 | "return_type function_name(data_type_of_arg1 arg1,data_type_of_arg2 arg2) { //your code goes here// return (value_to_be_returned); }", 11 | }, 12 | example: { 13 | declaration: "float fun(float,int);", 14 | call: "float val = fun(5.5 , 10);", 15 | definition: 16 | "float fun(float x,int y) { float ans=x+y; return ans;} //ans=15.5 is returned", 17 | }, 18 | methods: [ 19 | { 20 | name: "Pass by value", 21 | description: 22 | "Value of actual arguments does not change with change in the value of formal arguments.", 23 | example: { 24 | declaration: "void fun(float,int);", 25 | call: "fun(a , b); //let's say a=5.5 and b=10", 26 | definition: 27 | "void fun(float x,int y) { x+=1; y+=1; } //value of a=5.5, b=10, x=6.5, y=11", 28 | }, 29 | }, 30 | { 31 | name: "Pass by reference", 32 | description: 33 | "Value of actual arguments changes with change in the value of formal arguments.", 34 | example: { 35 | declaration: "void fun(float,int);", 36 | call: "fun(a , b); //let's say a=5.5 and b=10", 37 | definition: 38 | "void fun(float &x,int &y) { x+=1; y+=1; } //value of a=6.5, b=11, x=6.5, y=11", 39 | }, 40 | }, 41 | ], 42 | notes: [ 43 | { 44 | note_1: 45 | "Function call and declaration includes a semicolon but definition does not.", 46 | }, 47 | { 48 | note_2: 49 | "Function declaration can be avoided if function definition is present before the calling function. // calling function is the function that calls fun()", 50 | }, 51 | { 52 | note_3: 53 | "All the variables declared inside function definition are destroyed if they don't belong to 'static' storage class.", 54 | }, 55 | ], 56 | }; 57 | 58 | module.exports = Functions; 59 | -------------------------------------------------------------------------------- /v1/languages/cpp/keywords.js: -------------------------------------------------------------------------------- 1 | const Keywords = { 2 | name: "Keywords", 3 | description: 4 | "Keyword is a predefined or reserved word in C++ library with a fixed meaning and used to perform an internal operation. C++ Language supports more than 64 keywords.Keywords are those words whose meaning is already defined by Compiler. These keywords cannot be used as an identifier. Note that keywords are the collection of reserved words and predefined identifiers. Predefined identifiers are identifiers that are defined by the compiler.", 5 | example: "auto, break, case, switch, int, float", 6 | }; 7 | 8 | module.exports = Keywords; 9 | -------------------------------------------------------------------------------- /v1/languages/cpp/operators.js: -------------------------------------------------------------------------------- 1 | const Operators = { 2 | name: "operators", 3 | desription: 4 | "An operator in C++ is a special symbol that tells the compiler to perform a specific mathematical or logical operation.", 5 | example: 6 | "{int a= 20; int b= 20; int c; c = a + b; cout << c // prints 40}", 7 | methods: [ 8 | { 9 | name: "Assignment operators", 10 | description: "Used to assign a value to a variable.", 11 | example: ["+=", "-=", "*=", "/=", "%=", "=a=b"], 12 | }, 13 | { 14 | name: "Arithmetic Operators", 15 | description: "Used to perform arithmetic operations.", 16 | example: ["+", "-", "*", "/", "%"], 17 | }, 18 | { 19 | name: "Relational Operators", 20 | description: "Used to verify a condition and returns true or false.", 21 | example: ["<", "<=", ">", ">=", "==", "!="], 22 | }, 23 | { 24 | name: "Logical Operator", 25 | description: 26 | "Used to return the result of a comparison between more than one conditions.", 27 | example: ["&&", "||", "!"], 28 | }, 29 | ], 30 | }; 31 | 32 | module.exports = Operators; 33 | -------------------------------------------------------------------------------- /v1/languages/cpp/statements-and-flow-control.js: -------------------------------------------------------------------------------- 1 | const StatementsAndFlowControl = { 2 | name: "Statements and flow control", 3 | description: 4 | "C++ statements represent individual instructions of a program. There are selection statements, iteration statements and jump statements.", 5 | example: "If and else statements, loops, switch statements.", 6 | methods: [ 7 | { 8 | name: "if and else selection statement", 9 | description: 10 | "The instructions after an if statement will only be executed if a certain condition is fulfilled.", 11 | example: 12 | 'if (x < 5) {\n cout << "you entered: " << x; \n cout << "and it is smaller than 5";', 13 | }, 14 | { 15 | name: "switch selection statement", 16 | description: 17 | "When you have multiple if else selection statements, it is sometimes a better idea to use a switch statement that will check the content of a certain value and compare it to a list of selection statements and perform the instructions once the criteria is met.", 18 | example: 19 | '\nswitch (value) {\n case 25:\n cout << "value is 25";\n break;\n case 50:\n cout << "value is 50";\n break;\n default:\n cout << "value is undefined";}', 20 | }, 21 | { 22 | name: "Loops iteration statements", 23 | description: 24 | "A loop will repeat a single or a block of statements a number of times or until a pre-defined condition is met. There are do, while and for statements.", 25 | example: [ 26 | '// count to 10 using while\n#include \nusing namespace std;\n\nint main ()\n{\n int n = 1;\n\n while (n <= 10) {\n cout << n << ", ";\n ++n;\n }\n}', 27 | '// count to 10 using do while\n#include \nusing namespace std;\n\nint main ()\n{\n int n = 1;\n\n do {\n cout << n << ", ";\n ++n;\n } while (n <=10)\n}', 28 | '// count to 10 using for\n#include \nusing namespace std;\n\nint main ()\n{\n for (int n=1; n<=10; n++) {\n cout << n << ", ";\n }\n}', 29 | ], 30 | }, 31 | { 32 | name: "break and continue jump statements", 33 | description: 34 | "A jump statement allows the programmer to alter the natural flow of the program and got to a particular section in the code to execute a certain instruction if a certain condition is met.", 35 | example: 36 | '// count to 10 interrupted\n#include \nusing namespace std;\n\nint main () {\nint n = 1;\n\n\n while (n <= 10) {\n cout << n << ", ";\n ++n;\n if (n==2) {\n cout << "stopped!";\n }\n }\n}', 37 | }, 38 | ], 39 | }; 40 | 41 | module.exports = StatementsAndFlowControl; 42 | -------------------------------------------------------------------------------- /v1/languages/cpp/variables.js: -------------------------------------------------------------------------------- 1 | const Variable = { 2 | name: "Variables", 3 | description: 4 | "A variable is a name of memory location. It is used to store data. Its value can be changed and it can be reused many times.It is a way to represent memory location through symbol so that it can be easily identified.", 5 | 6 | syntax: "type variable_names", 7 | example: "int x; float y, z; char z = 'A';", 8 | rulesToFollow: [ 9 | { 10 | rule_1: "A variable can have alphabets, digits and underscore.", 11 | }, 12 | { 13 | rule_2: 14 | "A variable name can start with alphabet and underscore only. It can not start with a digit.", 15 | }, 16 | { 17 | rule_3: "No white space is allowed within variable name.", 18 | }, 19 | { 20 | rule_4: 21 | "A variable name must not be any reserved word or keyword e.g. char, float etc.", 22 | }, 23 | ], 24 | }; 25 | 26 | module.exports = Variable; 27 | -------------------------------------------------------------------------------- /v1/languages/css/selectors.js: -------------------------------------------------------------------------------- 1 | const selectors = { 2 | name: "CSS Selectors", 3 | description: 4 | "In CSS, selectors are patterns used to select the element(s) you want to style.", 5 | 6 | syntax: "selectorName { css_property: value;}", 7 | 8 | selectors: [ 9 | { 10 | name: ".class", 11 | example: ".highlight", 12 | description: 13 | "Selects all the elements in the page with class='highlight'", 14 | }, 15 | 16 | { 17 | name: ".class1.class2", 18 | example: ".name1 .name2", 19 | description: 20 | "Selects all the elements in the page with class='name1' and class='name2'", 21 | note: "No spaces between the class selectors", 22 | }, 23 | 24 | { 25 | name: ".class1 .class2", 26 | example: ".highlight1 .highlight2", 27 | description: 28 | "Selects all the elements in the page with class='highlight2' that is descendant of the class='highlight1'", 29 | }, 30 | 31 | { 32 | name: "#id", 33 | example: "#highlight", 34 | description: "Select the element in the page with id='highlight'", 35 | }, 36 | 37 | { 38 | name: "*", 39 | example: "*", 40 | description: "Selects all the elements in the page", 41 | }, 42 | 43 | { 44 | name: "element", 45 | example: "p", 46 | description: "Selects all the

element in the page", 47 | }, 48 | 49 | { 50 | name: ".class", 51 | example: ".highlight", 52 | description: 53 | "Selects all the elements in the page with class='highlight'", 54 | }, 55 | { 56 | name: "element.class", 57 | example: "p.highlight", 58 | description: 59 | "Selects all the

element in the page with class='highlight'", 60 | }, 61 | 62 | { 63 | name: "element,element", 64 | example: "div,p", 65 | description: "Selects all the

elements and the

in the page", 66 | }, 67 | 68 | { 69 | name: "element element", 70 | example: "div p", 71 | description: 72 | "Selects all the

elements in the page which are inside the

elements", 73 | }, 74 | 75 | { 76 | name: "element>element", 77 | example: "div>p", 78 | description: 79 | "Selects all

elements where the parent is a

element", 80 | }, 81 | 82 | { 83 | name: "element+element", 84 | example: "div+p", 85 | description: 86 | "Selects all

elements which is placed immediatly after the

element", 87 | }, 88 | 89 | { 90 | name: "element~element", 91 | example: "div~p", 92 | description: 93 | "Selects every

element that are preceded by a

element", 94 | }, 95 | 96 | { 97 | name: "[attribute]", 98 | example: "[type]", 99 | description: "Selects all elements with a type attribute", 100 | }, 101 | 102 | { 103 | name: "[attribute=value]", 104 | example: "[type='text']", 105 | description: 106 | "Selects all elements with a type attribute and it's value must be text", 107 | }, 108 | 109 | { 110 | name: "[attribute~=value]", 111 | example: "[title~=flower]", 112 | description: 113 | "Selects all elements with a title attribute containing the word 'flower'", 114 | }, 115 | { 116 | name: ":active", 117 | example: "a:active", 118 | description: "Selects the active link", 119 | }, 120 | 121 | { 122 | name: "::after", 123 | example: "div::after", 124 | description: "Insert something after the content of each
element", 125 | }, 126 | 127 | { 128 | name: "::before", 129 | example: "div::before", 130 | description: "Insert something before the content of each
element", 131 | }, 132 | 133 | { 134 | name: ":checked", 135 | example: "input:checked", 136 | description: "select every input element after they are checked", 137 | }, 138 | 139 | { 140 | name: ":disabled", 141 | example: "button:disabled", 142 | description: "select every button element if they are disabled", 143 | }, 144 | 145 | { 146 | name: ":enabled", 147 | example: "button:enabled", 148 | description: "select every button element if they are enabled", 149 | }, 150 | 151 | { 152 | name: ":first-child", 153 | example: "p:first-child", 154 | description: 155 | "Selects every

element that is the first child of its parent", 156 | }, 157 | 158 | { 159 | name: ":focus", 160 | example: "input:focus", 161 | description: "Selects the input element which has focus", 162 | }, 163 | 164 | { 165 | name: ":visited", 166 | example: "a:visited", 167 | description: "Selects link when it is visted or clicked", 168 | }, 169 | 170 | { 171 | name: ":last-child", 172 | example: "p:last-child", 173 | description: 174 | "Selects the

element which is the last element of it's parent", 175 | }, 176 | 177 | { 178 | name: ":nth-child(n)", 179 | example: "p:nth-child(3)", 180 | description: 181 | "Selects the

element which is the 3rd child of it's parent", 182 | }, 183 | 184 | { 185 | name: ":nth-last-child(n)", 186 | example: "p:nth-last-child(3)", 187 | description: 188 | "Selects every

element that is the second child of its parent, counting from the last child", 189 | }, 190 | ], 191 | }; 192 | 193 | module.exports = selectors; 194 | -------------------------------------------------------------------------------- /v1/languages/html/a.js: -------------------------------------------------------------------------------- 1 | const A = { 2 | name: "A", 3 | description: 4 | "The tag defines a hyperlink, which is used to link to another document. Destination is specified in HREF attribute", 5 | example: 6 | " I'm a link to ZTM community ", 7 | }; 8 | 9 | module.exports = A; 10 | -------------------------------------------------------------------------------- /v1/languages/html/abbr.js: -------------------------------------------------------------------------------- 1 | const Abbr = { 2 | name: "Abbr", 3 | description: 4 | "The HTML Abbreviation element () represents an abbreviation or acronym; the optional title attribute can provide an expansion or description for the abbreviation. If present, title must contain this full description and nothing else.", 5 | example: ` 6 |

7 | You can use CSS to style your HTML. 8 |

`, 9 | }; 10 | 11 | module.exports = Abbr; -------------------------------------------------------------------------------- /v1/languages/html/address.js: -------------------------------------------------------------------------------- 1 | const Address = { 2 | name: "Address", 3 | description: 4 | "The
tag is used to view an address of an author of document or article. The contact information can be an email address, URL, physical address, phone number, social media etc.", 5 | example: `
Written by John Example : john@example.com
`, 6 | }; 7 | 8 | module.exports = Address; 9 | -------------------------------------------------------------------------------- /v1/languages/html/article.js: -------------------------------------------------------------------------------- 1 | const Article = { 2 | name: "Article", 3 | description: 4 | "The
tag defines a independent content. An article should make sense on its own and it should be possible to distribute it independently from the rest of the document. Possible use cases of this tag are for example : blog post, forum post, news story etc ", 5 | example: `
6 |

Heading

7 |

Paragraph of an article

8 |
`, 9 | }; 10 | 11 | module.exports = Article; 12 | -------------------------------------------------------------------------------- /v1/languages/html/aside.js: -------------------------------------------------------------------------------- 1 | const Aside = { 2 | name: "Aside", 3 | description: 4 | "The