{"id":44245160,"url":"https://github.com/jjdltc/data-interpreter","last_synced_at":"2026-02-10T12:04:58.498Z","repository":{"id":73770340,"uuid":"200729435","full_name":"jjdltc/data-interpreter","owner":"jjdltc","description":"A library to transform / normalize / map a data source (JS Data Structure) using a template.","archived":false,"fork":false,"pushed_at":"2019-10-11T03:29:11.000Z","size":21,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-28T14:57:55.762Z","etag":null,"topics":["data-interpreter","data-mapping","data-normalize","data-scheme","data-template","data-transfor","data-transformation","dictionary","interpreter","json","json-data","json-schema","mapping","normalize","scheme","scheme-interpreter","structure","structured-data","template","transform"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jjdltc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2019-08-05T21:11:07.000Z","updated_at":"2024-09-20T12:13:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc24a66a-1c2a-4b36-9fc9-fea40d7d74cb","html_url":"https://github.com/jjdltc/data-interpreter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jjdltc/data-interpreter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjdltc%2Fdata-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjdltc%2Fdata-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjdltc%2Fdata-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjdltc%2Fdata-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjdltc","download_url":"https://codeload.github.com/jjdltc/data-interpreter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjdltc%2Fdata-interpreter/sbom","scorecard":{"id":522042,"data":{"date":"2025-08-11","repo":{"name":"github.com/jjdltc/data-interpreter","commit":"bcf7fec0078788c0a4825d75b2a93048128ea4b4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/20 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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/npmpublish.yml:1","Warn: no topLevel permission defined: .github/workflows/test_and_lint.yaml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npmpublish.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/jjdltc/data-interpreter/npmpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npmpublish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/jjdltc/data-interpreter/npmpublish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_and_lint.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/jjdltc/data-interpreter/test_and_lint.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_and_lint.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/jjdltc/data-interpreter/test_and_lint.yaml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/npmpublish.yml:16","Warn: npmCommand not pinned by hash: .github/workflows/test_and_lint.yaml:16","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 npmCommand dependencies pinned"],"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"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-20T03:17:12.806Z","repository_id":73770340,"created_at":"2025-08-20T03:17:12.806Z","updated_at":"2025-08-20T03:17:12.806Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28967109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T03:46:10.227Z","status":"ssl_error","status_checked_at":"2026-02-01T03:46:01.693Z","response_time":56,"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":["data-interpreter","data-mapping","data-normalize","data-scheme","data-template","data-transfor","data-transformation","dictionary","interpreter","json","json-data","json-schema","mapping","normalize","scheme","scheme-interpreter","structure","structured-data","template","transform"],"created_at":"2026-02-10T12:04:35.793Z","updated_at":"2026-02-10T12:04:58.481Z","avatar_url":"https://github.com/jjdltc.png","language":"JavaScript","readme":"# Data Interpreter\n\nA library to transform / normalize / map a data source (JS Data Structure) using a template.\n\n#### Instalation\n- node: `npm install data-interpreter`\n\n#### Basic Documentation\n- `constructor([options])`\n  -`options`: Is an optional object with any of the follow attributes\n    - `splitChar` (String \".\"): Accesor char, used to indicated inner object attributes in the _template_ \n    - `defaultValue` (Any undefined): Value to be used when no other valued is found from the _template_ in the _source_\n    - `literalChar` (String \"=\"): Indicates that the following text in the _template_ must be used as literal value\n    - `reverseMapping` (Boolean false): When true, use the absense of _literalChar_ as indication of literal value\n- `cast(source, dictionary[, options])` Main function, used to transfor / cast / translate a template / dictionary using a input (Js data structure)\n    - `source` (Object|Array): Source to use as input in the _template_\n    - `dictionary` (String|Object|Array): The structure of the expected output, using the reference to the source.\n    - `options` (Object): Optional override of the instance _options_\n- `getValueFromObject(source, path)`\n    - `source`: (Object|Array): Source to use as input to get the data\n    - `path`: (String|Array): the path to seek the value, using the _splitChar_ as accesor separator. For example `\"path.to.inner.value\"` or `[\"path\",\"to\",\"inner\",\"value\"]`\n- `getType(variableToCheck)`: Helper function that return a string with the tipe of the variable.\n    - `variableToCheck` (Any)\n\n#### Use Examples\n- Using a source like:\n  ```\n  const source = {\n    stringLvl1                      : \"stringValueLvl1\",\n    arrayLvl1                       : [\"arrayValueLvl1\"],\n    objectLvl1                      : {\n        numberLvl2                  : 2,\n        booleanLvl2                 : true,\n        objectLvl2                  : {\n            stringLvl3              : \"stringValueLvl3\",\n        },\n    },\n    iterableArray                   : [\n        {iterableItemAttribute      : \"iterableItemValue1\"},\n        {iterableItemAttribute      : \"iterableItemValue2\"},\n    ],\n  }\n  ```\n- And a basic instance of `data-interpreter`\n  ```\n  const dataInterpreter = require(\"data-interpreter\");\n  const interpreter = new dataInterpreter();\n  ``` \n- You could:\n  - Use a plain _dictionary_\n    ```\n    interpreter.cast(source, \"stringLvl1\")\n    -\u003e \"stringValueLvl1\"\n    ```\n  - Use an object type _dictionary_\n    ```\n    interpreter.cast(source, { \n        attrName : \"stringLvl1\"\n    })\n    -\u003e { attrName : \"stringValueLvl1\" }\n    ```\n  - Use nested references to the _source_\n    ```\n    interpreter.cast(source, {\n      attrName : \"objectLvl1.numberLvl2\"\n    })\n    -\u003e { attrName : 2 }\n    ```\n  - Use _dictionary_ as complex as need it\n    ```\n    interpreter.cast(source, { \n      attrName : { \n        innerAttrName : \"stringLvl1\"\n      }\n    })\n    -\u003e { attrName : { innerAttrName : \"stringValueLvl1\"} }\n    ```\n  - Use _dictionary_ with literal values\n    ```\n    interpreter.cast(source, { attrName : \"=LiteralText\"})\n    -\u003e { attrName : \"LiteralText\"}\n    ```\n  - Use _dictionary_ with objects or arrays as part of its data structures\n    ```\n    interpreter.cast(source, { \n      attrName : [ \"stringLvl1\", \"objectLvl1.numberLvl2\" ]\n    })\n    -\u003e { attrName : [\"stringValueLvl1\", 2] }\n    ```\n  - Iterate collections (By value)\n    ```\n    interpreter.cast(source, { attributeName : [ \n      \"$forEach($iterableArray, $iterationItem, $iterationIndex)\", \n      \"$iterationItem.iterableItemAttribute\"\n    ]})\n    -\u003e {attributeName : [\"iterableItemValue1\", \"iterableItemValue2\"]}\n    ```\n  - Iterate collections (By index)\n    ```\n    interpreter.cast(source, { attributeName : [ \n      \"$forEach($iterableArray, $iterationItem, $iterationIndex)\", \n      \"iterableArray.$iterationIndex.iterableItemAttribute\"\n    ]})\n    -\u003e {attributeName : [\"iterableItemValue1\", \"iterableItemValue2\"]}\n    ```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjdltc%2Fdata-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjdltc%2Fdata-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjdltc%2Fdata-interpreter/lists"}