{"id":18687338,"url":"https://github.com/junosuarez/clean-whitespace","last_synced_at":"2025-04-12T05:27:14.327Z","repository":{"id":10604367,"uuid":"12820564","full_name":"junosuarez/clean-whitespace","owner":"junosuarez","description":"normalize whitepsace characters to \\t \\n and space","archived":false,"fork":false,"pushed_at":"2013-09-14T00:08:47.000Z","size":116,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-10T15:36:24.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/junosuarez.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}},"created_at":"2013-09-13T22:17:03.000Z","updated_at":"2016-10-01T20:01:42.000Z","dependencies_parsed_at":"2022-09-02T13:41:22.736Z","dependency_job_id":null,"html_url":"https://github.com/junosuarez/clean-whitespace","commit_stats":null,"previous_names":["agilemd/clean-whitespace"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fclean-whitespace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fclean-whitespace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fclean-whitespace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fclean-whitespace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junosuarez","download_url":"https://codeload.github.com/junosuarez/clean-whitespace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248521401,"owners_count":21118065,"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":[],"created_at":"2024-11-07T10:32:30.639Z","updated_at":"2025-04-12T05:27:14.297Z","avatar_url":"https://github.com/junosuarez.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clean-whitespace\nnormalize whitepsace characters to \\t \\n and space\n\n## usage\n```js\nvar cleanWhitespace = require('clean-whitespace')\n\nvar clean = cleanWhitespace(gnarlyStringsUsersCopyAndPastedFromWord)\n\nvar options = {tab: '  '}\nvar spaces = cleanWhitespace('\\t\\t', options)\n  // =\u003e '    '\n\n```\n\nCleans and normalizes whitespace, handling line breaks, characters, whitespace, and invisible characters.\n\n### Options\nThe second parameter is an options object with any of the following:\n\n- **tab** : string, default '\\t' - replacement for tab characters\n- **tabSpace** : number - if specified, matches `tabSpace` repeated spaces as a tab character, eg:\n\n    ```js\n    cleanWhitespace('  hi', {tabSpace: 2}) // =\u003e '\\thi'\n    ```\n\n- **space** : string, default ' ' - replacement for space characters\n- **line** : string, default '\\n' - replacement for linebreak characters\n- **invisible** : string, default '' - replacement for invisible characters\n\n\n## api\n\n### `cleanWhitespace(String, options? : Object) =\u003e String`\nCleans extended whitespace characters from strings.\n\n## installation\n\n    $ npm install clean-whitespace\n\n\n## running the tests\n\nFrom package root:\n\n    $ npm install\n    $ npm test\n\n\n## contributors\n\n- jden \u003cjason@denizac.org\u003e\n\n\n## license\nMIT. (c) MMXIII AgileMD http://agilemd.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Fclean-whitespace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunosuarez%2Fclean-whitespace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Fclean-whitespace/lists"}