{"id":13764191,"url":"https://github.com/freeall/single-line-log","last_synced_at":"2025-04-12T19:49:21.210Z","repository":{"id":10562089,"uuid":"12764771","full_name":"freeall/single-line-log","owner":"freeall","description":"Output one line and move to beginning of line. Useful for progress bars and counters with no breaks in the terminal","archived":false,"fork":false,"pushed_at":"2022-08-05T09:53:53.000Z","size":16,"stargazers_count":207,"open_issues_count":8,"forks_count":26,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T19:49:14.829Z","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/freeall.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":"2013-09-11T18:55:55.000Z","updated_at":"2025-04-07T14:42:24.000Z","dependencies_parsed_at":"2022-08-07T05:15:54.452Z","dependency_job_id":null,"html_url":"https://github.com/freeall/single-line-log","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freeall%2Fsingle-line-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freeall%2Fsingle-line-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freeall%2Fsingle-line-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freeall%2Fsingle-line-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freeall","download_url":"https://codeload.github.com/freeall/single-line-log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625501,"owners_count":21135513,"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-08-03T16:00:15.334Z","updated_at":"2025-04-12T19:49:21.183Z","avatar_url":"https://github.com/freeall.png","language":"JavaScript","funding_links":[],"categories":["Animation"],"sub_categories":[],"readme":"# single-line-log\n\nNode.js module that keeps writing to the same line in the console (or a stream). Very useful when you write progress bars, or a status message during longer operations. Supports multilines.\n\n\n## Installation\n\n\tnpm install single-line-log\n\n\n## Usage\n\n``` js\nvar log = require('single-line-log').stdout;\n// or pass any stream:\n// var log = require('single-line-log')(process.stdout);\n\nvar read = 0;\nvar size = fs.statSync('super-large-file').size;\n\nvar rs = fs.createReadStream('super-large-file');\nrs.on('data', function(data) {\n\tread += data.length;\n\tvar percentage = Math.floor(100*read/size);\n\n\t// Keep writing to the same two lines in the console\n\tlog('Writing to super large file\\n[' + percentage + '%]', read, 'bytes read');\n});\n```\n\n## .clear()\n\nClears the log (i.e., writes a newline).\n\n``` js\nvar log = require('single-line-log').stdout;\n\nlog('Line 1');\nlog.clear();\nlog('Line 2');\n```\n\n\n## .stdout\n\nOutputs to `process.stdout`.\n\n\n## .stderr\n\nOutputs to `process.stderr`.\n\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreeall%2Fsingle-line-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreeall%2Fsingle-line-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreeall%2Fsingle-line-log/lists"}