{"id":21698371,"url":"https://github.com/ndangles/letlog","last_synced_at":"2025-10-13T10:10:16.427Z","repository":{"id":101737397,"uuid":"121201169","full_name":"ndangles/letlog","owner":"ndangles","description":"Simple logging module that logs variables with their respective names added on as labels in the console","archived":false,"fork":false,"pushed_at":"2019-11-21T01:08:08.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-28T01:05:51.013Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/letlog","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/ndangles.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-12T04:48:05.000Z","updated_at":"2019-11-21T01:08:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"119ec86c-7356-4ebb-8ab3-dba8f15aaefe","html_url":"https://github.com/ndangles/letlog","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.050000000000000044","last_synced_commit":"08a00980db600d6124999973b512297e0752e5a3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ndangles/letlog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndangles%2Fletlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndangles%2Fletlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndangles%2Fletlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndangles%2Fletlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ndangles","download_url":"https://codeload.github.com/ndangles/letlog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ndangles%2Fletlog/sbom","scorecard":{"id":677624,"data":{"date":"2025-08-11","repo":{"name":"github.com/ndangles/letlog","commit":"08a00980db600d6124999973b512297e0752e5a3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T22:00:50.367Z","repository_id":101737397,"created_at":"2025-08-21T22:00:50.367Z","updated_at":"2025-08-21T22:00:50.367Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014676,"owners_count":26085554,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"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-25T19:33:21.431Z","updated_at":"2025-10-13T10:10:16.394Z","avatar_url":"https://github.com/ndangles.png","language":"JavaScript","readme":"Letlog\n=================\nTutorial/Walkthrough -\u003e [https://youtu.be/t4JoeftH2Vk](https://youtu.be/t4JoeftH2Vk)\n\nLetlog is a flexible logging module that lets you simply log the variable itself while the module attaches a label of the variable name passed in to the console allowing for fast logging and identifying of variables in console output.\n\u003cbr\u003e\u003cbr\u003e\nLetlog is also configurable, allowing you to change label size, color and formatting, making it easier to identify variables in messy console output.\n\u003cbr\u003e\u003cbr\u003e\nBasic example:\n```js\nconst letlog = require('letlog').log;\nconst promote = \"Check out my gaming channel https://www.youtube.com/channel/UCINwvRizJqUV34O8RFz6b8g\"\nletlog(promote); //No need to write that tedious label in console.log to identify some output\n\n/*\nConsole output:\n\npromote: Check out my gaming channel https://www.youtube.com/channel/UCINwvRizJqUV34O8RFz6b8g\n\n*/\n```\n\n\n\nInstallation\n------------\n\nnpm i letlog --save\n\n\n\nUsage\n-----\n\nLetlog is a module that helps cut down on tedious console.log labeling when printing out simply variables. With this module you will be able to simply log the variable itself while the module attaches a label of the variable name for you.\n\nConfiguration\n-------------\nThis module is configurable with different options to make it customizable to your needs or preferences. See below for details on each option.\n\nBelow are the default configuration options:\n```js\nconst default_options = {\n    separator: \":\",\n    case: \"none\",\n    function: \"letlog\",\n    color: \"white\",\n    bgColor: \"bgBlack\",\n    style: \"reset\"\n}\n```\n\n\n\"separator\" -\u003e This is used to separate the label from the variable output. For example, using default options, the output of console.log(myVar) would be 'myVar: some data that was stored in myVar'.\n\n\"case\" -\u003e This option is defaulted to none but also accepts the values of 'upper' and 'lower'. This changes the letter case of the variable label that is outputted. For example, if this option was set to 'upper' then console.log(myVar) would output 'MYVAR: some data'.\n\n\"function\" -\u003e This option should be configured to be the name of the function you are using to log variables. For example, const letlog = require('letlog').log; letlog(myVar). But if you were to change from the default to something like 'const log = require('letlog').log; log(myVar)' then function should be configured to 'log';\n\n\"color\" -\u003e This will change the text color of the label. The color options are as follows:\n- black\n- red\n- green\n- yellow\n- blue\n- magenta\n- cyan\n- white\n- gray\n- grey\n- rainbow\n- zebra\n- america\n- trap\n- random\n\n\"bgColor\" -\u003e This will change the background color of the label. The background color options are as follows:\n- bgBlack\n- bgRed\n- bgGreen\n- bgYellow\n- bgBlue\n- bgMagenta\n- bgCyan\n- bgWhite\n\n\"style\" -\u003e This will change the style of the label text. The style options are as follows:\n- reset\n- bold\n- dim\n- italic\n- underline\n- inverse\n- hidden\n- strikethrough\n\n\nExample #1 Custom Configuration Usage:\n```js\nconst custom_options = {\n    separator: \"-\u003e\",\n    case: \"upper\",\n    style: \"italic\"\n} // options that are not set will be set to the defaults\n\nconst letlog = require('letlog').log;\nrequire('letlog').options(custom_options);\n\nconst price = 9.34;\n\nletlog(price)\n```\n\nExample #2 Custom Configuration Usage:\n```js\nconst custom_options = {\n    bgColor: \"bgBlue\",\n    function: \"logger.log\"\n} // options that are not set will be set to the defaults\n\nconst logger = require('letlog')\nlogger.options(custom_options);\n\nconst price = 9.34;\n\nlogger.log(price)\n```\n\n\n Functions\n -------\n\nThese are the currently available functions listed below and examples on how to use them.\n\n\n - \u003ch3\u003e log(data) \u003c/h3\u003e\n\n \t-\u003e logs variable data with a label attached of the variable name passed into the function\n\n  Example:\n  ```js\n  const letlog = require('letlog').log;\n  const myVar = \"I'm really hungry as I am writing this readme\"\n  letlog(myVar);\n\n  /*\n  Output:\n\n  myVar: I'm really hungry as I am writing this readme\n\n  */\n  ```\n\n\u003cbr\u003e\u003cbr\u003e\n\n\n  - \u003ch3\u003e options(custom_options) \u003c/h3\u003e\n\n   -\u003e Globally sets options for the module\n\n   Example:\n   ```js\n   const custom_options = {\n     case: :\"upper\",\n     separator: \"---\"\n   }\n\n   const letlog = require('letlog').log;\n   require('letlog').options(custom_options);\n\n   const price = 3.2342\n   letlog(price)\n\n   /*\n   Output:\n\n   PRICE --- 3.2342\n\n   */\n   ```\n\n   Bugs\n  ------\n\n  Please let me know if you run into any bugs and I will try to fix them as soon as possible. This module is still new and was made in a hacky way so bugs may exist.\n\n\n How does this work?\n ------\n\n I rather not say. This was made in a very hacky way but the best way I could find at the time. If you are really interested about the inter-workings of this module, feel free to take a look at the [Github](https://github.com/ndangles/letlog) for a good laugh.\n\n My research on accessing the name of the variable being passed to a function left me with limited results based on javascript's limitations. Accessing that information from a single file is quite simple. Throw the same functionality into a module trying to account for many different use cases and scenarios and it gets very tricky and that information can't be accessed as easily.\n\n If you feel there is a better way to write this or you have any suggestions please let me know.\n\n\n Future\n ------\n\nPlan is to add features as I need them or see a use case for but also if there are people using this module besides me I will add features or changes upon requests.\n\nSupport\n------\n\nIf for some reason you are looking to support this project, I'd appreciate any follows/subscriptions to any of the follow social media:\n\n- [Gaming Youtube](https://www.youtube.com/channel/UCINwvRizJqUV34O8RFz6b8g)\n- [Tech Youtube](https://www.youtube.com/channel/UCWiek_kV6cTlbU2Frq-KzPA)\n- [Twitch](https://twitch.tv/ThaDangler)\n- [Twitter](https://twitter.com/Tha_Dangler)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndangles%2Fletlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndangles%2Fletlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndangles%2Fletlog/lists"}