{"id":16387252,"url":"https://github.com/ahqsoftwares/jas-js","last_synced_at":"2026-05-17T19:03:17.143Z","repository":{"id":167825317,"uuid":"485431850","full_name":"ahqsoftwares/jas-js","owner":"ahqsoftwares","description":"Ts style version of js with in built cli","archived":false,"fork":false,"pushed_at":"2022-11-11T16:41:41.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-03T14:44:23.562Z","etag":null,"topics":["cli","javascript","nodejs","nodejs-api","package","script"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ahqsoftwares.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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":"2022-04-25T15:39:44.000Z","updated_at":"2023-03-31T18:59:54.000Z","dependencies_parsed_at":"2023-07-01T15:09:33.173Z","dependency_job_id":null,"html_url":"https://github.com/ahqsoftwares/jas-js","commit_stats":{"total_commits":43,"total_committers":4,"mean_commits":10.75,"dds":"0.13953488372093026","last_synced_commit":"822e41b53433a60201a06126c114c2ed180736f6"},"previous_names":["ahqsoftwares/jas-js"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahqsoftwares%2Fjas-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahqsoftwares%2Fjas-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahqsoftwares%2Fjas-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahqsoftwares%2Fjas-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahqsoftwares","download_url":"https://codeload.github.com/ahqsoftwares/jas-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170085,"owners_count":19759145,"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":["cli","javascript","nodejs","nodejs-api","package","script"],"created_at":"2024-10-11T04:26:01.039Z","updated_at":"2026-05-17T19:03:17.028Z","avatar_url":"https://github.com/ahqsoftwares.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **JAS**\n\"JAS\" is simply Javascript Actions Script based on the idea of a unique style js syntaxes\n\n## Contribuers\nCli: [Retro](https://github.com/retrouser955)\n\nPackage: [AHQ Softwares](https://github.com/ahqsoftwares)\n\n## Installation\n\nInstalling JAS without CLI\n\n```bash\nnpm i jas-script\n```\n\nWith CLI\n\n```bash\nnpm i -D jas-script\n# or install it globally\nnpm i -g jas-script\n```\n\n## Example\n```js\nconst jas = require(\"jas-script\");\nconst compiler = new jas();\ncompile.compile(\"./test/code.js\");\n```\ntest/code.js \n```ts\n//A simple discord bot code on jas\nconst discord = need(`eris`);\nclient.connect()\nclient.on(\"error\", (err) =\u003e print(err));\n```\n\n# **Docs**\n\nTable of contents:-\n1. [Basics](#understanding-the-basics)\n2. [Inter Process Database](#inter-process-jas-database)\n3. [Difference](#difference-between-js-and-jas)\n4. [CLI](#cli)\n\n# Understanding the Basics\nFirst of all make an index.js file\n```js\nconst jas = require(\"jas-script\");\nconst module = new jas(\"./test/code.js\");\nmodule.compile();\n```\n#### Now create a folder `test` and inside the folder make a file `code.js`\n#### Contents:-\n```js\nprint(`Hello world!`);\n```\nnow just run `node index.js` and you'll see the result\n```bash\nJAS-System-info: Found file ./test/code.ts\nHello world\n``` \n# Inter process jas database\n\n#### The object is `tempbase`\n\n#### The jas database has the following functions as a general db\n```js\n/*\nSet data to tempbase\n*/\ntempbase.set(`Hello`, \"world\");\ntempbase.set(`number`, 1);\n\n/*\nGet data from tempbase\n*/\ntempbase.fetch(`Hello`); //returns \"world\"\n\n/*\nDelete data from tempbase\n*/\ntempbase.delete(`Hello`);\n\n/*\nAdd data to tempbase\n*/\ntempbase.add(`number`, 3); //number is now 4\n\n/*\nSubtract data from tembase\n*/\ntempbase.subtract(`number`, 3); //number is now 1\n```\n\n# Difference between js and jas\n\n#### Following the differences between js and jas\n\n# 1. require() is now need()\n\njs\n```js\nconst fs = require(\"fs\");\n```\njas\n```js\nconst fs = need(\"fs\");\n```\n\n# 2. Constructor\n\n### `new module(...options)` is now `a(module, ...options)`\n\njs\n```js\nconst jas = require(\"jas-script\");\nconst compiler = new jas(\"./test/code.js\");\n```\n\nsame code in jas\n```js\nconst jas = need(\"jas-script\");\nconst compiler =  a(jas, \"./test/code.js\");\n/*\nYou can still use new if you're not accustomed to it\n*/\nconst compiler = new jas(\"./test/code.js\"); //using legacy one\n```\n\n# 3. Process object changes\n## In jas process.cwd() will return \"home/vm\" and process.mainCwd() will return the correct dir\n\n### js\n```js\nconsole.log(process.cwd())\n//returns dir\n```\n\n### jas\n```js\nprint(process.cwd())\n//returns \"home/vm\"\nprint(process.mainCwd())\n//returns dir name\n```\n\n# 3. `__dirname` is now `dir`\n\n# CLI\n\nJAS also has a new CLI, as of 0.2.0.\nContents under CLI:-\n1. [How to use?](#how-to-install-the-cli)\n2. [Run jas code](#run-your-jas-code-from-the-cli)\n3. [Get jas version from cli](#get-version-name-from-the-cli)\n4. [Use prebuild templates](#use-prebuild-templates)\n\n## How to install the cli?\nTo install the `cli` use the following command\n```bash\nnpm i jas-script -g --save\n```\n\nTo view the help menu view use\n```bash\njas\n/*or*/\njas help\n```\n\n## Run your jas code from the cli\nYou can run your jas code directly from the cli without using a js file by the following cmd\n\n### If installed globally\n```bash\njas load -f \u003cfs file path\u003e\n/*\nYou can exclude -f also\n*/\njas load \u003cfs file path\u003e\n```\n\n### If install a devDeps\n\nMake a script in your package.json named \"start\"\n\n```json\n\"scripts\": {\n    \"start\": \"jas load -f \\\"pathToYourFile.js\\\"\"\n},\n/*\nYou can also exclude -f\n*/\n\"scripts\": {\n    \"start\": \"jas load \\\"pathToYourFile.js\\\"\"\n},\n```\nThen run\n\n```bash\nnpm start\n```\n\n## Get version name from the CLI\nYou can get the jas version directly from the cli with the following command\n```bash\njas version\n/*\nYou can use `jas ver` also\n*/\njas ver\n```\nor \n```bash\njas --version\n/*\nYou can use `jas --ver` also\n*/\njas --ver\n```\n\n## Use prebuild templates\nTo use our prebuild templates use the following command\n```bash\njas create\n/*\nApparantly there are some aliases\n*/\njas make\n/*or*/\njas --create\n/*or*/\njas --make\n```\n\n# NOTE\n## **1.** JAS cannot be used to make packages\n## **2.** JAS script once loaded cannot be terminated until node process dies\n## **3.** JAS script is still in PRE RELEASE","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahqsoftwares%2Fjas-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahqsoftwares%2Fjas-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahqsoftwares%2Fjas-js/lists"}