{"id":51418213,"url":"https://github.com/brickifyjs/module-json-transform","last_synced_at":"2026-07-04T22:01:45.483Z","repository":{"id":57100642,"uuid":"105703097","full_name":"brickifyjs/module-json-transform","owner":"brickifyjs","description":"Transform any JSON into any language/template","archived":false,"fork":false,"pushed_at":"2017-10-10T16:19:40.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-23T01:07:27.492Z","etag":null,"topics":["bricksjs","brickskit","file","json","module","string","template","transform"],"latest_commit_sha":null,"homepage":"https://m-jt.js.brickify.io","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/brickifyjs.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}},"created_at":"2017-10-03T21:03:48.000Z","updated_at":"2017-10-10T16:37:55.000Z","dependencies_parsed_at":"2022-08-20T21:10:35.152Z","dependency_job_id":null,"html_url":"https://github.com/brickifyjs/module-json-transform","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/brickifyjs/module-json-transform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickifyjs%2Fmodule-json-transform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickifyjs%2Fmodule-json-transform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickifyjs%2Fmodule-json-transform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickifyjs%2Fmodule-json-transform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brickifyjs","download_url":"https://codeload.github.com/brickifyjs/module-json-transform/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brickifyjs%2Fmodule-json-transform/sbom","scorecard":{"id":253588,"data":{"date":"2025-08-11","repo":{"name":"github.com/brickifyjs/module-json-transform","commit":"d6ffaee358b3ce53ff682e8c485b82f4cc650150"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/4 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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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-17T09:03:23.182Z","repository_id":57100642,"created_at":"2025-08-17T09:03:23.182Z","updated_at":"2025-08-17T09:03:23.182Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35136712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bricksjs","brickskit","file","json","module","string","template","transform"],"created_at":"2026-07-04T22:01:44.948Z","updated_at":"2026-07-04T22:01:45.473Z","avatar_url":"https://github.com/brickifyjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## module-json-transform\n\n\u003e Transform any JSON into any language/template\n\n## Statistics\n\n[![Github All Releases](https://img.shields.io/github/downloads/brickifyjs/module-json-transform/total.svg?style=flat-square)](https://github.com/brickifyjs/module-json-transform)\n[![npm](https://img.shields.io/npm/dt/@brickify/m-jt.svg?style=flat-square)](https://www.npmjs.com/package/@brickify/m-jt)\n\n## Social\n[![GitHub forks](https://img.shields.io/github/forks/brickifyjs/module-json-transform.svg?label=Fork\u0026style=flat-square)](https://github.com/brickifyjs/module-json-transform)\n[![GitHub stars](https://img.shields.io/github/stars/brickifyjs/module-json-transform.svg?label=Stars\u0026style=flat-square)](https://github.com/brickifyjs/module-json-transform)\n[![GitHub watchers](https://img.shields.io/github/watchers/brickifyjs/module-json-transform.svg?label=Watch\u0026style=flat-square)](https://github.com/brickifyjs/module-json-transform)\n[![Gitter](https://img.shields.io/gitter/room/brickifyjs/module-json-transform.svg?style=flat-square)](https://gitter.im/brickifyjs/module-json-transform)\n\n## Project Health\n\n[![Travis branch](https://img.shields.io/travis/brickifyjs/module-json-transform/master.svg?style=flat-square)](https://travis-ci.org/brickifyjs/module-json-transform)\n[![Codecov](https://img.shields.io/codecov/c/github/brickifyjs/module-json-transform.svg?style=flat-square)](https://codecov.io/gh/brickifyjs/module-json-transform)\n[![bitHound](https://img.shields.io/bithound/dependencies/github/brickifyjs/module-json-transform.svg?style=flat-square)](https://www.bithound.io/github/brickifyjs/module-json-transform/master/dependencies/npm)\n[![bitHound](https://img.shields.io/bithound/devDependencies/github/brickifyjs/module-json-transform.svg?style=flat-square)](https://www.bithound.io/github/brickifyjs/module-json-transform/master/dependencies/npm)\n[![Website](https://img.shields.io/website/https/m-jt.js.brickify.io.svg?label=website\u0026style=flat-square)](https://m-jt.js.brickify.io)\n\n## Install\n\n```bash\n$ npm install @brickskit/m-jt\n```\n\n\n## Usage\n\n```js\n\n// Require module\nvar JSONtransform = require('@brickskit/m-jt');\n\n// Define your JSON to be transformed\nvar json = \n[\n {\n   'repository': 'https://github.com/brickskit/module-json-transform',\n   'package': '@brickskit/m-jt',\n   'title': 'JSON Transform',\n   'desc': 'Transform any JSON into any langage/template',\n   'topics': [\n     'JAVASCRIPT',\n     'JSON',\n     'TRANSFORM'\n   ]\n },\n {\n   'repository': 'URL',\n   'package': 'PACKAGE_NAME',\n   'title': 'PROJECT TITLE',\n   'desc': 'PROJECT DESCRIPTION',\n   'topics': [\n     'JAVASCRIPT'\n   ]\n }\n];\n\n// Define your parser\nvar parser = function () {\n  var topics = this.input.map(function (entry) {\n    return entry.topics;\n  });\n\n  this.topics = [].concat.apply([], topics).reduce(function (prev, current) {\n    var prev0 = prev;\n    if (prev.indexOf(current) === -1) {\n      prev0 = prev.concat(current);\n    }\n\n    return prev0;\n  }, []);\n\n  return this;\n};\n\n\nvar template = function () {\n  var that = this;\n  var str = '# TABLE OF CONTENT\\n';\n\n  var toc = this.topics.map(function (topic) {\n    return '* [' + topic.toUpperCase() + '](#' + topic + ')\\n';\n  });\n\n  str += toc.join('');\n\n  var sections = this.topics.map(function (topic) {\n    return '\\n# ' + topic.toUpperCase() + ' \\n'\n      + '| TITLE | DESCRIPTION | NPM | GITHUB | \\n'\n      + '| ----- | ----------- | --- | ------ |\\n'\n\n      + that.input.filter(function (entry) {\n        var result = false;\n        if (entry.topics.indexOf(topic) \u003e -1) {\n          result = true;\n        }\n        return result;\n      }).map(function (entry) {\n        return '| ' + entry.title + ' | ' + entry.desc + ' | ' + (entry.package \u0026\u0026 ('[' + entry.package + '](http://www.npmjs.com/package/' + entry.package + ')')) + ' | [' + entry.title + '](' + entry.repository + ')  |';\n      }).join('\\n')\n      + '\\n';\n  });\n\n  str += sections.join('');\n\n  this.computedTemplate = str;\n\n  return this;\n};\n\nnew JSONtransform(json) // Instantiate\n.parse(parser) // Parse json in order to export topics\n.transform(template) // Transform json to markdown\n.toString(); // Export to string   \n```\n\n\n## Extend\n\n```js\n\n// Create your own parsing method\nJSONtransform.prototype.parseTopics = function () {\n  var topics = this.input.map(function (entry) {\n    return entry.topics;\n  });\n\n  this.topics = [].concat.apply([], topics).reduce(function (prev, current) {\n    var prev0 = prev;\n    if (prev.indexOf(current) === -1) {\n      prev0 = prev.concat(current);\n    }\n\n    return prev0;\n  }, []);\n\n  return this;\n};\n\n// Define language to exoort with default template\nJSONtransform.prototype.toMD = function (template) {\n  this['md_' + template] \u0026\u0026 this['md_' + template]() || this.md_table();\n  return this;\n};\n\n// Define template\nJSONtransform.prototype.md_table = function () {\n  var that = this;\n  var str = '# TABLE OF CONTENT\\n';\n\n  var toc = this.topics.map(function (topic) {\n    return '* [' + topic.toUpperCase() + '](#' + topic + ')\\n';\n  });\n\n  str += toc.join('');\n\n  var sections = this.topics.map(function (topic) {\n    return '\\n# ' + topic.toUpperCase() + ' \\n'\n      + '| TITLE | DESCRIPTION | NPM | GITHUB | \\n'\n      + '| ----- | ----------- | --- | ------ |\\n'\n\n      + that.input.filter(function (entry) {\n        var result = false;\n        if (entry.topics.indexOf(topic) \u003e -1) {\n          result = true;\n        }\n        return result;\n      }).map(function (entry) {\n        return '| ' + entry.title + ' | ' + entry.desc + ' | ' + (entry.package \u0026\u0026 ('[' + entry.package + '](http://www.npmjs.com/package/' + entry.package + ')')) + ' | [' + entry.title + '](' + entry.repository + ')  |';\n      }).join('\\n')\n      + '\\n';\n  });\n\n  str += sections.join('');\n\n  this.computedTemplate = str;\n\n  return this;\n};\n```\n\n## API\n\n```js\n// JSON reference\nthis.input \n```\n\n```js\n// String refernce for output\nthis.computedTemplate \n```\n\n```js\n// Parse JSON if needed with a parser function\n.parse(fn);\n```\n\n```js\n// Transform JSON to any language/template with a templating function\n.transform(fn);\n```\n\n```js\n// Export result to string\n.toString();\n```\n\n\n```js\n// Export result to file\n.toFile('./PATH/FILE.EXT');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrickifyjs%2Fmodule-json-transform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrickifyjs%2Fmodule-json-transform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrickifyjs%2Fmodule-json-transform/lists"}