{"id":15070141,"url":"https://github.com/ruyadorno/simple-output","last_synced_at":"2025-06-29T23:37:15.211Z","repository":{"id":19321649,"uuid":"22559943","full_name":"ruyadorno/simple-output","owner":"ruyadorno","description":"Output messages to stdout/stderr","archived":false,"fork":false,"pushed_at":"2023-03-07T03:51:42.000Z","size":366,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T19:52:34.088Z","etag":null,"topics":["javascript","js","nodejs","stderr","stdout"],"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/ruyadorno.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-02T23:08:03.000Z","updated_at":"2024-06-18T22:40:05.880Z","dependencies_parsed_at":"2024-06-18T22:39:53.207Z","dependency_job_id":"389452ad-ebf8-498c-b69d-0637de6dfdb7","html_url":"https://github.com/ruyadorno/simple-output","commit_stats":{"total_commits":49,"total_committers":2,"mean_commits":24.5,"dds":"0.020408163265306145","last_synced_commit":"0e15c98516813f17bb5d837a229a62ff91fe55d9"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruyadorno%2Fsimple-output","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruyadorno%2Fsimple-output/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruyadorno%2Fsimple-output/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruyadorno%2Fsimple-output/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruyadorno","download_url":"https://codeload.github.com/ruyadorno/simple-output/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248262029,"owners_count":21074230,"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","nodejs","stderr","stdout"],"created_at":"2024-09-25T01:48:36.985Z","updated_at":"2025-04-10T17:35:28.533Z","avatar_url":"https://github.com/ruyadorno.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-output\n\n[![NPM version](https://badge.fury.io/js/simple-output.svg)](https://npmjs.org/package/simple-output)\n[![Build Status](https://travis-ci.org/ruyadorno/simple-output.svg?branch=master)](https://travis-ci.org/ruyadorno/simple-output)\n[![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://raw.githubusercontent.com/ruyadorno/simple-output/master/LICENSE)\n\nPretty output messages to stdout/stderr with no extra dependencies.\n\n\u003cdiv align=\"center\"\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cimg alt=\"render examples\" width=\"350\" src=\"https://user-images.githubusercontent.com/220900/150694210-7284e3fe-e713-42a4-98b9-f6d42dad9ac1.png\"\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/div\u003e\n\n## Getting Started\nInstall the module with: `npm install simple-output`\n\n## Examples\n\n```javascript\nvar log = require('simple-output');\n\nlog.success('Successful hello world');\n```\n\n## Available methods\n\n- success(msg)\n- info(msg)\n- warn(msg)\n- error(msg)\n- node(msg) prints a green hexagon icon (on supported platforms) along with msg\n- message(msg) prints msg, no icon associated with it\n- hint(msg) useful if you want to dim some of the output\n\n## Testing\n\nThis module helps on testing your output data by making it simpler to mock `simple-output` and its methods or use the exposed streams interface to which the data gets written to.\n\nIn order to test your output information, replace the stdout/stderr properties with an mock object containing a write function (simulating the streams api). See the example below:\n\n### Mock simpleOutput.stdout\n\n```javascript\nvar log = require('simple-output');\nvar myModule = require('../my-module');\n\nlog.stdout = {\n    write: function(msg) {\n        assert(msg, 'hello world');\n    }\n};\n\nmyModule.methodThatUsesSimpleLogInfoInternally();\n```\n\n### Using a mocking library\n\n```javascript\nvar requireInject = require('require-inject');\n\nvar myModule = requireInject('../my-module', {\n    'simple-output': {\n        info: msg =\u003e assert(msg, 'hello world');\n    }\n});\n\nmyModule.methodThatUsesSimpleLogInfoInternally();\n```\n\n## License\n\n[MIT](LICENSE) © 2022 [Ruy Adorno](http://ruyadorno.com)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruyadorno%2Fsimple-output","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruyadorno%2Fsimple-output","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruyadorno%2Fsimple-output/lists"}