{"id":19320243,"url":"https://github.com/jlyonsmith/whitespace-js","last_synced_at":"2026-06-20T07:31:34.645Z","repository":{"id":42363437,"uuid":"108438210","full_name":"jlyonsmith/whitespace-js","owner":"jlyonsmith","description":"EOL/BOL whitespace space normalization tools","archived":false,"fork":false,"pushed_at":"2023-01-04T21:36:08.000Z","size":997,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-15T21:30:13.731Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jlyonsmith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-26T16:38:44.000Z","updated_at":"2021-08-10T17:03:54.000Z","dependencies_parsed_at":"2023-02-02T20:45:39.250Z","dependency_job_id":null,"html_url":"https://github.com/jlyonsmith/whitespace-js","commit_stats":null,"previous_names":["jlyonsmith/whitespace-tools","jlyonsmith/whitespace"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/jlyonsmith/whitespace-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fwhitespace-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fwhitespace-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fwhitespace-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fwhitespace-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlyonsmith","download_url":"https://codeload.github.com/jlyonsmith/whitespace-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlyonsmith%2Fwhitespace-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34561766,"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-06-20T02:00:06.407Z","response_time":98,"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":[],"created_at":"2024-11-10T01:27:58.711Z","updated_at":"2026-06-20T07:31:34.630Z","avatar_url":"https://github.com/jlyonsmith.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Whitespace Tools\n\nTools to normalize end-of-line (EOL) \u0026 beginning-of-line (BOL) whitespace in text files.\n\n## Installation\n\nInstall the tools with:\n\n```\nnpm install whitespace-tools\n```\n\nThis will install the `spacer` and `ender` tools. Or run the latest version directly from [npmjs.org](https://nodejs.org) with:\n\n```\nnpx -p whitespace-tools spacer ...\nnpx -p whitespace-tools ender ...\n```\n\n## Ender\n\nThe `ender` tool will normalize line endings.  Run `ender --help` for a list of options.\n\nRun with a file name or pipe a file into the tool to get information on current line endings:\n\n```\nender src/mySourceFile.js\ncat someTextFile.txt | ender\n```\n\nTo convert a file, supply `--new-eol` as one of `cr`, `lf`, `crlf` or `auto`.  If no `-output-file` option is given, the file will go to STDOUT.\n\n## Spacer\n\nThe `spacer` tool will normalize line beginnings, up to the first non-whitespace character.  Run `spacer --help` for options.\n\nRun with a file name or pipe a file into the tool to get information on current line beginnings:\n\n```\nspacer src/mySourcFile.js\ncat someTextFile.txt | spacer\n```\n\nYou can supply the `--new-bol` argument with either `spaces`, `tabs` or `auto`.  If the file has existing tabs, supply the `--tab-size` argument indicating how many spaces a tab represents. If `tabs` is supplied as `--new-bol`, supply the `--round` flag if you wish extra spaces to be rounded down to a whole tab.  Without this flag, the outputted file will still be reported as having `mixed` BOL's if there are any odd spaces in the BOL's.\n\n## About This project\n\nI've implemented this project in C#, Ruby, Python and now Javascript as a way to learn new programming languages, and also because they are _really useful tools_!  A search across projects in GitHub will reveal just how many files have mixtures of tabs \u0026 spaces at line BOL's.  Line ending problems are a little rarer these days, but they do still occur from time-to-time.  \n\nThe project is written in ES6 Javascript and cross compiled using Babel.  It currently targets Node 8.  PR's welcome for any enhancements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlyonsmith%2Fwhitespace-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlyonsmith%2Fwhitespace-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlyonsmith%2Fwhitespace-js/lists"}