{"id":21005734,"url":"https://github.com/wandeber/quara","last_synced_at":"2026-02-28T15:01:05.500Z","repository":{"id":225364891,"uuid":"682820657","full_name":"wandeber/quara","owner":"wandeber","description":"Lenguaje de programación interpretado por JavaScript. Pensado para preprocesar texto como platillas de email.","archived":false,"fork":false,"pushed_at":"2025-05-10T09:35:31.000Z","size":370,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-11T19:22:37.475Z","etag":null,"topics":["interpreter","language","programming"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wandeber.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,"zenodo":null}},"created_at":"2023-08-25T00:57:30.000Z","updated_at":"2025-05-10T09:35:27.000Z","dependencies_parsed_at":"2024-03-27T19:27:51.102Z","dependency_job_id":"7e1e2cb6-f29b-40d4-93fb-3fd9d5de2e8d","html_url":"https://github.com/wandeber/quara","commit_stats":{"total_commits":71,"total_committers":1,"mean_commits":71.0,"dds":0.0,"last_synced_commit":"864615d838685f5d6532bd45c76e817965e8a755"},"previous_names":["wandeber/quara"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/wandeber/quara","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandeber%2Fquara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandeber%2Fquara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandeber%2Fquara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandeber%2Fquara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wandeber","download_url":"https://codeload.github.com/wandeber/quara/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wandeber%2Fquara/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29938962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interpreter","language","programming"],"created_at":"2024-11-19T08:47:57.370Z","updated_at":"2026-02-28T15:01:05.434Z","avatar_url":"https://github.com/wandeber.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Quara](https://www.npmjs.com/package/quara) - [![GitHub license](https://img.shields.io/badge/license-CC_BY--ND_4.0-blue.svg)](https://github.com/wandeber/quara?tab=License-1-ov-file#readme) [![Version](https://img.shields.io/github/package-json/v/wandeber/quara)](https://www.npmjs.com/package/quara) [![size](https://img.shields.io/bundlephobia/min/quara)](https://www.npmjs.com/package/quara)\n\n\n\u003e Query as Sara\n\n**Don't use this in production**: I may introduce breaking changes until version 1.0.0.\n\nProgramming language interpreted by JavaScript to preprocess text files like email templates.\n\n## About\n- Supported comments:\n  - Line comments: // ...\n  - Block comments: /* ... */\n- Supported operators:\n  - +, -, *, /, %, ^, ¬/\n  - =, +=, -=, *=, /=, %=, ^=\n  - !, ==, !=, ~=, !~=, \u003c, \u003e, \u003c=, \u003e=, \u0026\u0026, ||\n  - not, eq, ne, leq, lne, lt, gt, lte, gte, and, or\n  - $not, $eq, $ne, $leq, $lne, $lt, $gt, $lte, $gte, $and, $or\n  - (, )\n  - ++, -- (as pre-increment and pre-decrement)\n  - ., [, ]\n  - .. (inclusive range operator)\n  - ..\u003c (exclusive range operator)\n  - {, }\n  - , (Comma)\n  - ;, :\n  - -\u003e\n  - \", `, \\\n  - in, $in\n  - /if, /while, /for, /fn, /struct, /class, /interface, /enum\n- Supported types:\n  - Booleans.\n  - Integer and decimal numbers.\n  - Strings.\n  - Objects, arrays.\n- Variables.\n- Reserved keywords:\n  - true, false\n  - const, var\n  - any, char, int, float, double, string, bool\n  - if, else\n  - while,\n  - for,\n  - fn, return,\n  - null\n  - enum\n  - struct,\n  - class, extends\n  - get, set\n  - static, abstract, final, virtual\n  - private, public, protected\n  - interface, implements\n\n### Variables and constants\n```js\nvar a = 14.10;\nconst b = \"Query as Sara\";\nc = true; // var is optional unless you want to override an outer variable.\n```\n\n### Objects\n\n\u003e WIP: The operator \":\" could be replaced by \"=\".\n\n```js\nobj = {\n  key1: 1,\n  key2: 2\n};\nkey = \"key3\";\nprint(obj.{key});\nobj.{key} = 4;\n```\n\n### Arrays\n```js\nlist = [1, 2, 3, 4, 5];\nlist.length; // 5\nprint(list[0]);\nnum = 2;\nprint(list[num]);\nlist[4] = 6;\nlist[num] = 7;\nlist.{4} = 6;\n\n// TODO: Add support for this?\nlist.2 = 5;\n```\n\n### Control\n\n#### If/else\n```js\nif condition {\n  // ...\n}\nelse if condition {\n  // ...\n}\nelse {\n  // ...\n}\n\nif c {r}\nelse if c2 {r2}\nelse {r3}\n\nif c -\u003e r\nelse if c2 -\u003e r2\nelse -\u003e r3\n```\n\n#### While\n```js\nwhile condition {\n  // ...\n}\n\nwhile c {r}\nwhile c: r /while;\nwhile c -\u003e r\n```\n\n#### For\n```rust\nfor value, index in list {\n  // ...\n}\n\nfor list {...}\nfor value in list {...}\nfor value, index in list {...}\n\nfor list: ... /for;\nfor value in list: ... /for;\nfor value, index in list: ... /for;\n\nfor list -\u003e /* One statement */;\nfor value in list -\u003e /* One statement */;\nfor value, index in list -\u003e /* One statement */;\n```\n\nList could be a range in any of the forms:\n```rust\nfor i in 0..5 {\n  // ...\n}\n```\n\n### Functions\n\n```js\nfn sum(a, b) {\n  return a + b;\n}\n```\n\n### Text processor/templates\n```js\n`Hola` // Hola\n```\n\nAssign the output to a variable:\n```js\nname = \"Sara\";\ntext = `Hola, {name}`; // Hola Sara\n```\n\nCoding:\n```js\nname = \"Sara\";\ntext = `Hola, {name += \" V.\"; name}`; // Hola Sara V.\n```\n\n#### variables:\n```js\nname = \"Sara\";\n`Hola, {name}` // Hola Sara\n```\n\n#### if/else statements:\n```js\nname = \"Sara\";\nuseName = true;\n`\n  Hola\n  {if useName:}\n    , {name}\n  {else:}\n    !\n  {/if}\n`\n```\n\n#### While loops:\n```js\ni = 0;\n`\n  {while i \u003c 5:}\n    {i}\n    {i = i + 1}\n  {/while}\n`\n```\n\n## Standard functions\n```js\ncontains\nisNaN\n\n// String:\nlength\nsplit\njoin\nupperCase\nlowerCase\ntrim\n\n// Math:\nabs\nceil\nfloor\nround\ntrunc\nmax\nmin\nfixed\n\n// Types:\nisNumber\nisDecimal\nisInteger\nisString\nisBoolean\nisObject\nisArray\nhelp\nlog\nprint\nhi\n```\n\n## Pending\n- Regular expressions\n- `break` and `continue`\n\n### Objects\n```js\nk = \"key1\";\nobj = {\n  {k}: 1,\n  {\"key2\"}: 2\n};\n```\n\n## References and special thanks\n\n- Thanks to [Ruslan Spivak](https://ruslanspivak.com/) for his [Let's Build A Simple Interpreter](https://ruslanspivak.com/lsbasi-part1/) series.\n- [LUA](https://github.com/lua/lua)\n\n## License\n\nQuara © 2024 by [Bernardo Alemán Siverio (wandeber)](https://github.com/wandeber) is licensed under [CC BY-ND 4.0](https://github.com/wandeber/quara?tab=License-1-ov-file#readme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandeber%2Fquara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwandeber%2Fquara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwandeber%2Fquara/lists"}