{"id":26025411,"url":"https://github.com/lagunoff/jexp","last_synced_at":"2026-04-16T21:31:42.994Z","repository":{"id":40797520,"uuid":"204700865","full_name":"lagunoff/jexp","owner":"lagunoff","description":"Simple functional language embedded in JSON","archived":false,"fork":false,"pushed_at":"2022-12-10T00:11:05.000Z","size":102,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T13:43:04.239Z","etag":null,"topics":["functional-language","json-rpc"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lagunoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-27T12:42:37.000Z","updated_at":"2019-09-04T16:19:43.000Z","dependencies_parsed_at":"2023-01-25T17:50:11.943Z","dependency_job_id":null,"html_url":"https://github.com/lagunoff/jexp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lagunoff/jexp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagunoff%2Fjexp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagunoff%2Fjexp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagunoff%2Fjexp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagunoff%2Fjexp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lagunoff","download_url":"https://codeload.github.com/lagunoff/jexp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagunoff%2Fjexp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31905362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["functional-language","json-rpc"],"created_at":"2025-03-06T13:39:36.104Z","updated_at":"2026-04-16T21:31:42.975Z","avatar_url":"https://github.com/lagunoff.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Generic badge](https://img.shields.io/badge/status-experimental-red.svg)](https://shields.io/)\n## Installation\n```sh\n$ yarn add jexp\n\n```\n## API reference\n#### jeval\n\n`function jeval(expr: unknown, ctx?: Cons\u003cReadonly\u003cRecord\u003cstring, unknown\u003e\u003e\u003e): unknown;`\n\nEvaluate `JExp`\n\n```ts\n const ex01: JExp = {\n   let: {\n     one: 1,\n     two: 2,\n   },\n   in: {\n     plus: ['one', 'two'],\n   }\n };\n assert.deepEqual(jexp.jeval(ex01), 3);\n```\n\n```ts\n const ex02: JExp = {\n   let: {\n     times10: {lambda: 'a', body: {mult:['a', 10]} },\n     two: 2,\n     twoTimesTen: {times10: 'two'},\n   },\n   in: ['two', 'twoTimesTen'],\n };\n assert.deepEqual(jexp.jeval(ex02), [2, 20]);\n```\n\n```ts\n const ex03: JExp = {\n   let: {\n     one: 1,\n     two: 2,\n     onePlusTwo: {plus: ['one', 'two']},\n     quotedOnePlusTwo: {$: {plus: ['one', 'two']}},\n   },\n   in: ['one', 'two', 'onePlusTwo', 'quotedOnePlusTwo'],\n };\n assert.deepEqual(jexp.jeval(ex03), [1, 2, 3, {plus: ['one', 'two']}]);\n```\n\n```ts\n const ex04: JExp = {\n   let: {\n     someThings: {$: [\n       {name: 'banana', type: 'fruits'},\n       {name: 'teapot', type: 'dishes'},\n       {name: 'Sun', type: 'stars'},\n     ]},\n     expressions: {_$: {\n       '1 + 1': {$_: {plus: [1, 1]}},\n       '(1 + 2) * 3': {$_: {mult: [{plus: [1, 2]}, 3]}},\n       '10 % 3': {$_: {mod: [10, 3]}},\n     }},\n   },\n   in: ['someThings', 'expressions'],\n };\n assert.deepEqual(jexp.jeval(ex04), [\n   [{name: 'banana', type: 'fruits'},\n    {name: 'teapot', type: 'dishes'},\n    {name: 'Sun', type: 'stars'},\n   ], {\n     '1 + 1': 2,\n     '(1 + 2) * 3': 9,\n     '10 % 3': 1,\n   },\n ]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagunoff%2Fjexp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flagunoff%2Fjexp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagunoff%2Fjexp/lists"}