{"id":22751840,"url":"https://github.com/boraseoksoon/code-trimmer","last_synced_at":"2025-03-30T06:43:06.263Z","repository":{"id":57202196,"uuid":"294953738","full_name":"boraseoksoon/code-trimmer","owner":"boraseoksoon","description":"`code-trimmer` will trim a given chunk of source code, started with unnecessarily added whitespaces or tabs, in a consistent way.","archived":false,"fork":false,"pushed_at":"2020-09-13T15:44:06.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-06T14:54:34.117Z","etag":null,"topics":["autocomplete-me","javascript","source","string","stringma","tabs","trim","whitespace"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/code-trimmer","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/boraseoksoon.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":"2020-09-12T13:54:18.000Z","updated_at":"2020-09-13T15:44:08.000Z","dependencies_parsed_at":"2022-09-17T15:02:07.799Z","dependency_job_id":null,"html_url":"https://github.com/boraseoksoon/code-trimmer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2Fcode-trimmer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2Fcode-trimmer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2Fcode-trimmer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boraseoksoon%2Fcode-trimmer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boraseoksoon","download_url":"https://codeload.github.com/boraseoksoon/code-trimmer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246285666,"owners_count":20752953,"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":["autocomplete-me","javascript","source","string","stringma","tabs","trim","whitespace"],"created_at":"2024-12-11T05:07:37.705Z","updated_at":"2025-03-30T06:43:06.221Z","avatar_url":"https://github.com/boraseoksoon.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## code-trimmer\n\nTrim source code into the beauty if needed for [node](http://nodejs.org), and [autocomplete-me](http://autocomplete-me.com).\n\ncode-trimmer will indent a given chunk of source code, started with unnecessarily added whitespaces or tabs, by trimming the tabs and white-spaces in a consistent way, scanning through line by line as following : \n\n[![NPM Version][npm-image]][npm-url]\n\n```js\nconst trimmer = require(\"./code-trimmer\")\n\nconst source = \"\\t\\t\\t\\t\\t\\t\\t(async () =\u003e {\\n\\t\\t\\t\\t\\t\\t\\t\\tconst result = await fire(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'trimmed!',\\n\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t})()\"\n\nconst res = trimmer.trim(source)\n\nconsole.log(res)\n```\n\norigin source =\u003e\n\n```js\n/*\n        (async () =\u003e {\n            const result = await Swal.fire(\n                'Success',\n                'Your code is saved!',\n                'success'\n            )\n\n            if (result) {\n                window.location = `${BASE_URL}/main`\n            }\n        })()\n*/\n```\n\ninto =\u003e\n\n```js\n/* \n(async () =\u003e {\n    const result = await Swal.fire(\n        'Success',\n        'Your code is saved!',\n        'success'\n    )\n\n    if (result) {\n        window.location = `${BASE_URL}/main`\n    }\n})()\n*/\n```\n\n## Installation for Node.js\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/).\n\nBefore installing, [download and install Node.js](https://nodejs.org/en/download/).\nNode.js 0.10 or higher is required.\n\nIf this is a brand new project, make sure to create a `package.json` first with\nthe [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).\n\nInstallation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```bash\n$ npm install code-trimmer\n```\n\n## Installation for Web Browser \n\nCDN\n\n```\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/code-trimmer@0.0.5/code-trimmer.js\"\u003e\u003c/script\u003e\n\n\u003cscript\u003e\nconst trimmer = require(\"./code-trimmer\")\n\nconst source = \"\\t\\t\\t\\t\\t\\t\\t(async () =\u003e {\\n\\t\\t\\t\\t\\t\\t\\t\\tconst result = await fire(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'trimmed!',\\n\\t\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t\\t})()\"\n\nconst res = trimmer.trim(source)\n\nconsole.log(res)\n\u003c/script\u003e\n```\n\n## Features\n\n\t* Do one thing well\n\t* Simple to use\n\n## Contributing\n\n[Contributing Guide](Contributing.md)\n\n## License\n\n  [MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/express.svg\n[npm-url]: https://npmjs.org/package/express","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboraseoksoon%2Fcode-trimmer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboraseoksoon%2Fcode-trimmer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboraseoksoon%2Fcode-trimmer/lists"}