{"id":21669347,"url":"https://github.com/attack-monkey/fql","last_synced_at":"2026-05-17T18:36:56.651Z","repository":{"id":57243077,"uuid":"198951762","full_name":"attack-monkey/fql","owner":"attack-monkey","description":"fql |\u003e function query language","archived":false,"fork":false,"pushed_at":"2019-07-27T22:21:35.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-14T11:00:07.566Z","etag":null,"topics":[],"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/attack-monkey.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-07-26T05:25:52.000Z","updated_at":"2019-07-27T22:21:37.000Z","dependencies_parsed_at":"2022-09-15T00:50:58.632Z","dependency_job_id":null,"html_url":"https://github.com/attack-monkey/fql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/attack-monkey/fql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Ffql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Ffql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Ffql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Ffql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/attack-monkey","download_url":"https://codeload.github.com/attack-monkey/fql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/attack-monkey%2Ffql/sbom","scorecard":{"id":215639,"data":{"date":"2025-08-11","repo":{"name":"github.com/attack-monkey/fql","commit":"c375e20e7ea2024795f89d5e18d4173587d658bc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T01:36:26.060Z","repository_id":57243077,"created_at":"2025-08-17T01:36:26.060Z","updated_at":"2025-08-17T01:36:26.060Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33149930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"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":[],"created_at":"2024-11-25T12:21:08.697Z","updated_at":"2026-05-17T18:36:56.646Z","avatar_url":"https://github.com/attack-monkey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"functionql |\u003e function query language\n==============================\n\nfunctionql (fql) uses JSON to transport function calls.\n\neg.\n\n```json\n{\n  \"__sum\": {\n    \"a\": 6,\n    \"b\": 4\n  }\n}\n```\n\nconverts to `sum({ a: 6, b: 4 })`\n\nwhich expects to map to a function that looks something like...\n\n```javascript\nconst sum = ({ a, b }) =\u003e a + b.\n```\n\nThe double underscore notation makes it easy to search for all function calls in a blob of json.\n\n\u003e Just ctrl+f __\n\nWhy fql?\n---------------------------------\n\nUnlike functions themselves, fql can be sent across server boundaries and from one language to another.\n\n```javascript\nfetch(\n    'https://my-api/calculator', {\n    method: 'POST'\n    body: JSON.stringify({\n        __sum: {\n            numbers: [1, 2, 3]\n        }\n    })\n)\n```\n\nFunctions can very expressive and can even include functions within functions...\n\n```javascript\n\n__sum: {\n  a: {\n    __product: {\n      a: 5, \n      b: 5\n    }\n  },\n  b: 3\n}\n    \n```\n\nfql is just a simple notation, that conveys meaning.\nCustom interpreters are easy to write, or you can use this one...\n\nfql's js interpreter makes it easy to call functions using fql...\n\n```javascript\nimport { fql } from 'functionql';\n\nconst sum = ({ a, b }) =\u003e a + b\n\nfql({ sum }, {\n  __sum: {\n    a: 6,\n    b: 3\n  }\n}) \n// 9\n```\n\nThe first argument take a map of functions.\nThe name assigned to the function should match the that in the query.\n\nThe second argument is the fql query.\n\n### The fql interpreter and functions within functions\n\nLet's take the following...\n\n```javascript\n\n__sum: {\n  a: {\n    __product: {\n      a: 5, \n      b: 5\n    }\n  },\n  b: 3\n}\n    \n```\n\nSince the above has a function within the function - we need to make our functions \"fql-aware\".\n\nThe sum function needs to be fql aware, so that when it gets a product function instead of a number - it can resolve it. \n\nTo do this we need to wrap `a` and `b` in an `fql` function. \nThe fql interpreter will check if the input is an object with double underscore notation.\nIf it meets the check, it will process it as fql, otherwise it will just return the input.\n\n\u003e Note how sum and product also get passed a `fns` param in addition to `a` and `b`.\n\u003e This is automatically passed in by the fql interpreter and allows you to utilise the original functions that were provided to the interpreter.\n\neg.\n\n```javascript\nconst sum = ({ a, b, fns }) =\u003e \n  fql(fns, a) + fql(fns, b)\n  \nconst product = ({ a, b, fns }) =\u003e \n  fql(fns, a) * fql(fns, b)\n  \nfql({sum, product}, {\n  __sum: {\n    a: {\n      __product: {\n        a: 5, \n        b: 5\n      }\n    },\n    b: 3\n  }\n})\n  \n```\n\nInterpreter Advanced\n--------------------\n\nThe interpreter can also interpret function calls with anonymous arguments, using the `args` keyword.\n\n```javascript\n\n{\n  __sum: {\n    args: [1, 2]\n  }\n}\n\n```\n\nmaps to `sum(1, 2)`\n\nAnd can perform curry functions using the `curry` key word.\n\n```javascript\n\n{\n  __sum: {\n    curry: [\n      { args: [1, 2] },\n      { args: [3] }\n    ]\n  }\n}\n\n```\n\nmaps to `sum(1, 2)(3)`\n\nAnd using the chain utility provided, can even method-chain...\n\n```javascript\n\nimport { fql, chain } from 'functionql'\n\nconst query = {\n  __chain: {\n    chain: [\n      {\n        __sum: {\n          curry: [\n            { args: [5, 5 ] },\n            { args: [3]}\n          ]\n        }\n      },\n      'toString',\n      { \n        'concat': {\n          args: [' y\\'all!!!']\n        }\n      },\n      'toUpperCase'\n    ]\n  }\n}\n\nfql({ chain, sum}, query) // 13 Y'ALL\n\n```\n\nWhich maps to `sum(5,5)(3).toString().concat(' y'all').toUpperCase()`\n\nUse cases for fql\n-----------------\n\nfql provides a very expressive syntax for apis, and since\nfql is just json, it's easy to parse and pass around.\nBy providing an fql endpoint in an api, you can then simply POST fql to it.\n\nfql vs graphQl\n\nWhere graphQl at it's core is about asking for specific fields on objects, fql is about making expressive function calls across server and language boundaries.\n\nInstall\n-----------------\n\nes6 / typescript\n\n```\nimport { fql, chain } from 'functionql'\n```\n\nnode\n\n```\nconst fql = require('functionql').fql;\nconst chain = require('functionql').chain;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattack-monkey%2Ffql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fattack-monkey%2Ffql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fattack-monkey%2Ffql/lists"}