{"id":17749601,"url":"https://github.com/oresoftware/json-2-clean-js","last_synced_at":"2025-04-01T08:11:58.908Z","repository":{"id":95712443,"uuid":"197861361","full_name":"ORESoftware/json-2-clean-js","owner":"ORESoftware","description":"Transform JSON to a JS object before runtime.","archived":false,"fork":false,"pushed_at":"2019-07-21T09:22:53.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-02T00:26:03.744Z","etag":null,"topics":["javascript","js","json","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/ORESoftware.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}},"created_at":"2019-07-20T01:00:34.000Z","updated_at":"2019-07-21T09:24:12.000Z","dependencies_parsed_at":"2023-04-13T10:03:43.688Z","dependency_job_id":null,"html_url":"https://github.com/ORESoftware/json-2-clean-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-2-clean-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-2-clean-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-2-clean-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ORESoftware%2Fjson-2-clean-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ORESoftware","download_url":"https://codeload.github.com/ORESoftware/json-2-clean-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246604611,"owners_count":20804100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["javascript","js","json","nodejs"],"created_at":"2024-10-26T11:23:53.471Z","updated_at":"2025-04-01T08:11:58.886Z","avatar_url":"https://github.com/ORESoftware.png","language":"Shell","readme":"\n\u003cdiv align=\"right\"\u003e\n\nTravis build status:\n[![Build Status](https://travis-ci.org/ORESoftware/typescript-library-skeleton.svg?branch=master)](https://travis-ci.org/ORESoftware/typescript-library-skeleton)\n\nCircleCI build status:\n[![CircleCI](https://circleci.com/gh/ORESoftware/typescript-library-skeleton/tree/master.svg?style=svg)](https://circleci.com/gh/ORESoftware/typescript-library-skeleton/tree/master)\n\n\u003c/div\u003e\n\n## Create clean JS from JSON\n\nNo extra strings and ugly stuff. Single quotes instead of double where possible.\n\n\n### Usage\n\n\u003cbr\u003e\n\n\u003e\n\u003e  \u003cb\u003eRead from a file:\u003c/b\u003e\n\u003e\n\u003e```\n\u003e $ json-2-clean-js -f package.json    \n\u003e```\n\u003e\n\n\u003cbr\u003e\n\n\u003e\n\u003e \u003cb\u003eRead from a string at the command line:\u003c/b\u003e\n\u003e\n\u003e```\n\u003e $ json-2-clean-js -i 'input string here'    \n\u003e```\n\u003e\n\n\u003cbr\u003e\n\n\u003e\n\u003e  \u003cb\u003eRead from stdin at the command line using a heredoc:\u003c/b\u003e\n\u003e\n\u003e```\n\u003e $ json-2-clean-js \u003c\u003cH\n\u003e     'use a heredoc, it's much much better'\n\u003e  H  \n\u003e```\n\u003e\n\n\u003cbr\u003e\n\n\u003e\n\u003e  \u003cb\u003eRead from stdin at the command line using a herestring:\u003c/b\u003e\n\u003e\n\u003e```\n\u003e $ json-2-clean-js \u003c\u003c\u003c 'use a heredoc instead of this, pls'\n\u003e```\n\u003e\n\n\n\u003cbr\u003e\n\n\u003e\n\u003e  \u003cb\u003eOr the most obvious way (but not as nice as heredoc)\u003c/b\u003e\n\u003e\n\u003e```\n\u003e $ echo 'foo' | json-2-clean-js\n\u003e```\n\u003e\n\n\n\n### Example input/output:\n\n\nInput:\n\n```json\n\n{\n  \"name\": \"json-2-clean-js\",\n  \"version\": \"0.0.1001\",\n  \"description\": \"Semver-oriented TypeScript library skeleton.\",\n  \"main\": \"dist/main.js\",\n  \"bin\": {\n    \"json-2-clean-js\": \"cli/json-2-clean-js.js\"\n  },\n  \"types\": \"dist/main.d.ts\",\n  \"typings\": \"dist/main.d.ts\",\n  \"scripts\": {\n    \"test\": \"suman test\",\n    \"postinstall\": \"./assets/postinstall.sh\",\n    \"xyz\": \"./scripts/npm/xyz.sh\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/ORESoftware/typescript-library-skeleton.git\"\n  },\n  \"keywords\": [\n    \"typescript\",\n    \"library\",\n    \"skeleton\",\n    \"scaffold\"\n  ],\n  \"author\": \"YOUR NAME HERE\",\n  \"license\": \"SEE LICENSE IN license.md\",\n  \"bugs\": {\n    \"url\": \"https://github.com/ORESoftware/typescript-library-skeleton/issues\"\n  },\n  \"homepage\": \"https://github.com/ORESoftware/typescript-library-skeleton#readme\",\n  \"dependencies\": {},\n  \"devDependencies\": {\n    \"@types/node\": \"^10.12.10\",\n    \"typescript\": \"^3.4.5\"\n  }\n}\n\n\n\n```\n\nand the output:\n\n\n```js\n\nconst val = {\n  name: 'json-2-clean-js',\n  version: '0.0.1001',\n  description: 'Semver-oriented TypeScript library skeleton.',\n  main: 'dist/main.js',\n  bin: {'json-2-clean-js': 'cli/json-2-clean-js.js'},\n  types: 'dist/main.d.ts',\n  typings: 'dist/main.d.ts',\n  scripts: {test: 'suman test', postinstall: './assets/postinstall.sh', xyz: './scripts/npm/xyz.sh'},\n  repository: {type: 'git', url: 'git+https://github.com/ORESoftware/typescript-library-skeleton.git'},\n  keywords: ['typescript', 'library', 'skeleton', 'scaffold'],\n  author: 'YOUR NAME HERE',\n  license: 'SEE LICENSE IN license.md',\n  bugs: {url: 'https://github.com/ORESoftware/typescript-library-skeleton/issues'},\n  homepage: 'https://github.com/ORESoftware/typescript-library-skeleton#readme',\n  dependencies: {},\n  devDependencies: {'@types/node': '^10.12.10', 'typescript': '^3.4.5'}\n};\n\n\n```\n\n\nThe idea is to easily get rid of unncessary quotes lulz.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fjson-2-clean-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foresoftware%2Fjson-2-clean-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foresoftware%2Fjson-2-clean-js/lists"}