{"id":17054569,"url":"https://github.com/grantcarthew/node-perj","last_synced_at":"2026-04-07T13:31:11.313Z","repository":{"id":57322199,"uuid":"131008506","full_name":"grantcarthew/node-perj","owner":"grantcarthew","description":"A fast, flexible JSON logger.","archived":false,"fork":false,"pushed_at":"2024-10-25T07:22:39.000Z","size":375,"stargazers_count":19,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-30T00:59:57.073Z","etag":null,"topics":["browser","fast","json","logger","logging","nodejs","simple"],"latest_commit_sha":null,"homepage":"https://github.com/grantcarthew/node-perj/wiki","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grantcarthew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2018-04-25T13:12:35.000Z","updated_at":"2024-10-27T16:12:59.000Z","dependencies_parsed_at":"2024-10-17T04:35:18.347Z","dependency_job_id":"6136db0f-3aa5-4ccd-9893-b77681a400f6","html_url":"https://github.com/grantcarthew/node-perj","commit_stats":{"total_commits":218,"total_committers":2,"mean_commits":109.0,"dds":"0.013761467889908285","last_synced_commit":"645fa47f44056787f70e14f7c2e40e5ec5915e8c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/grantcarthew/node-perj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantcarthew%2Fnode-perj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantcarthew%2Fnode-perj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantcarthew%2Fnode-perj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantcarthew%2Fnode-perj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grantcarthew","download_url":"https://codeload.github.com/grantcarthew/node-perj/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grantcarthew%2Fnode-perj/sbom","scorecard":{"id":443564,"data":{"date":"2025-08-11","repo":{"name":"github.com/grantcarthew/node-perj","commit":"d6c68eebaa56feb374470040d338e0c90d2e2eb0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"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"}},{"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T06:09:20.326Z","repository_id":57322199,"created_at":"2025-08-19T06:09:20.326Z","updated_at":"2025-08-19T06:09:20.326Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31515144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["browser","fast","json","logger","logging","nodejs","simple"],"created_at":"2024-10-14T10:15:10.274Z","updated_at":"2026-04-07T13:31:11.295Z","avatar_url":"https://github.com/grantcarthew.png","language":"JavaScript","funding_links":["https://www.patreon.com/grantcarthew"],"categories":[],"sub_categories":[],"readme":"# perj\n\nA fast, flexible JSON logger.\n\n[![Maintainability][cc-maintain-badge]][cc-maintain-url]\n[![File Size][size-gzip-badge]][size-gzip-url]\n[![NPM Version][npm-v-badge]][perj-npm]\n[![Patreon Donation][patreon-image]][patreon-url]\n[![Twitter][twitter-badge]][twitter-url]\n\n[![perj][perj-image]][perj-url]\n\n## Installing\n\n### Node.js\n\nThe [package.json](https://github.com/grantcarthew/node-perj/blob/master/package.json) has two configurations related to Node.js installations:\n\n- `main`: points to the minified version compiled for v6.0.0 and above.\n- `module`: points to the [src][perj-src] files. [Module field details](https://github.com/nodejs/node-eps/blob/4217dca299d89c8c18ac44c878b5fe9581974ef3/002-es6-modules.md#51-determining-if-source-is-an-es-module).\n\nThe [index.js](https://github.com/grantcarthew/node-perj/blob/master/index.js) points to the minified version compiled for v6.0.0 and above.\n\n```sh\n\nnpm install --save perj\n\n```\n\n### Browser\n\nUse the [dist][perj-dist] files or bundle from [src][perj-src].\n\n| Type              | Size                                           | CDN                                        |\n| ----------------- | ---------------------------------------------- | ------------------------------------------ |\n| gzipped           | [![File Size][size-gzip-badge]][size-gzip-url] | https://unpkg.com/perj/dist/perj.min.js.gz |\n| minified          | [![File Size][size-min-badge]][size-min-url]   | https://unpkg.com/perj/dist/perj.min.js    |\n| full (source map) | [![File Size][size-full-badge]][size-full-url] | https://unpkg.com/perj/dist/perj.js        |\n\nSee [Unpkg](https://unpkg.com/) for fixed version options.\n\n## Goals\n\n- Designed to be integrated (DIY) ✔️\n- Cross platform (Node.js and Browser) ✔️\n- Flexible log and additional property options ✔️\n- Fast ✔️\n\n## Features\n\n- No dependencies.\n- Flexible API ([change almost everything][perj-options]).\n- Flexible log methods:\n  - Log items can be any number in any order of any type.\n- The first string is nested under the 'msg' key:\n  - First string includes a string argument or an Error message.\n  - Additional string arguments are nested under the data key.\n- Objects are nested under the 'data' key as an object or array of objects.\n- Repeated string top level properties become [hierarchical][perj-separatorString].\n- [Examples][perj-examples] to get you started.\n\n## Quick Start\n\n### Node.js Usage\n\nThe following example adds `ver`, `name`, `host`, `pid` and `file` top level property to the log output:\n\n```js\nimport Perj from 'perj';\nimport os from 'os';\nimport path from 'path';\n\n// Customize the variables below as needed. They are not required.\nconst ver = 1;\nconst name = 'QuickStart';\nconst host = os.hostname();\nconst pid = process.pid;\nconst file = path.basename(import.meta.url, '.js');\n\nconst log = new Perj({ ver, name, host, pid, file });\n\nlog.info('the quick brown fox jumps over the lazy dog');\n\n\n/*\n\nThe following string is sent to standard out:\n\n{\"level\":\"info\",\"lvl\":30,\"ver\":1,\"name\":\"QuickStart\",\"host\":\"Dev\",\"pid\":233241,\"file\":\"quick-start\",\"time\":1526102959677,\"msg\":\"the quick brown fox jumps over the lazy dog\",\"data\":\"\"}\n\n*/\n```\n\n### Browser Usage\n\nThe following example adds `ver`, `name`, and `host` top level property to the log entries:\n\n```js\nimport Perj from \"https://unpkg.com/perj/dist/perj.js\"\n\n// Customize the variables below as needed. They are not required.\nconst ver = 1;\nconst name = \"QuickStart\";\nconst host = location.hostname;\n\nconst log = new Perj({ ver, name, host });\n\nlog.info(\"the quick brown fox jumps over the lazy dog\");\n\n/*\n\nThe following string is sent to the console:\n\n{\"level\":\"info\",\"lvl\":30,\"ver\":1,\"name\":\"QuickStart\",\"host\":\"http://Dev\",\"time\":1526103303019,\"msg\":\"the quick brown fox jumps over the lazy dog\",\"data\":\"\"}\n\n*/\n```\n\n## Documentation\n\nFor full documentation see the [Wiki][perj-wiki].\n\n## About the Owner\n\nI'm Grant Carthew, a technologist from Queensland, Australia, with a passion for coding. I delve into personal projects and develop custom solutions when the existing tools fall short.\n\nThis repository hosts my custom logging solution, created because I couldn't find a logging package that met my needs.\n\nAll my open-source work is crafted in my own time, as a contribution to the community that has supported me.\n\nIf my projects have been useful to you and you'd like to express your appreciation or support, please consider joining me on Patreon. Your support helps sustain and grow these initiatives!\n\n[![Patreon Donation][patreon-image]][patreon-url]\n\nSee my [other projects on NPM](https://www.npmjs.com/~grantcarthew).\n\n## Credit\n\nThis project only exists because it is standing on the shoulders of [GIANTS][pino-url].\n\nSpecial thanks to the [guys](https://github.com/pinojs/pino/graphs/contributors) working on [pino][pino-url] being:\n\n- [David Mark Clements](https://github.com/davidmarkclements)\n- [Matteo Collina](https://github.com/mcollina)\n- [James Sumners](https://github.com/jsumners)\n\nA lot of the inspiration for `perj` came from the [pino][pino-url] package.\n\nNot to mention the other packages and resources used to help develop on the Node.js platform.\n\n## Contributing\n\n1.  Fork it!\n2.  Create your feature branch: `git checkout -b my-new-feature`\n3.  Commit your changes: `git commit -am 'Add some feature'`\n4.  Push to the branch: `git push origin my-new-feature`\n5.  Submit a pull request :D\n\n[cc-maintain-badge]: https://api.codeclimate.com/v1/badges/14946690a2410b71177e/maintainability\n[cc-maintain-url]: https://codeclimate.com/github/grantcarthew/node-perj/maintainability\n[cc-coverage-badge]: https://api.codeclimate.com/v1/badges/14946690a2410b71177e/test_coverage\n[cc-coverage-url]: https://codeclimate.com/github/grantcarthew/node-perj/test_coverage\n[npm-v-badge]: https://img.shields.io/npm/v/perj.svg\n[size-gzip-badge]: https://img.shields.io/github/size/grantcarthew/node-perj/dist/perj.min.js.gz.svg\n[size-gzip-url]: https://github.com/grantcarthew/node-perj/blob/master/dist/perj.min.js.gz\n[size-min-badge]: https://img.shields.io/github/size/grantcarthew/node-perj/dist/perj.min.js.svg\n[size-min-url]: https://github.com/grantcarthew/node-perj/blob/master/dist/perj.min.js\n[size-full-badge]: https://img.shields.io/github/size/grantcarthew/node-perj/dist/perj.js.svg\n[size-full-url]: https://github.com/grantcarthew/node-perj/blob/master/dist/perj.js\n[patreon-image]: https://img.shields.io/badge/patreon-donate-yellow.svg\n[patreon-url]: https://www.patreon.com/grantcarthew\n[twitter-badge]: https://img.shields.io/twitter/url/http/shields.io.svg?style=social\n[twitter-url]: https://x.com/grantcarthew\n[perj-image]: https://rawgit.com/grantcarthew/node-perj/master/perj.svg\n[perj-url]: https://github.com/grantcarthew/node-perj\n[perj-npm]: https://www.npmjs.com/package/perj\n[perj-wiki]: https://github.com/grantcarthew/node-perj/wiki\n[perj-src]: https://github.com/grantcarthew/node-perj/tree/master/src\n[perj-dist]: https://github.com/grantcarthew/node-perj/tree/master/dist\n[perj-options]: https://github.com/grantcarthew/node-perj/wiki/Options\n[perj-separatorString]: https://github.com/grantcarthew/node-perj/wiki/separatorString\n[perj-examples]: https://github.com/grantcarthew/node-perj/wiki/Examples\n[pino-url]: https://www.npmjs.com/package/pino\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantcarthew%2Fnode-perj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrantcarthew%2Fnode-perj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrantcarthew%2Fnode-perj/lists"}