{"id":32963094,"url":"https://github.com/taijinlee/humanize","last_synced_at":"2025-11-16T12:01:01.226Z","repository":{"id":3330511,"uuid":"4374167","full_name":"taijinlee/humanize","owner":"taijinlee","description":"A JS library for adding a “human touch” to data.","archived":false,"fork":true,"pushed_at":"2015-12-02T15:31:12.000Z","size":329,"stargazers_count":362,"open_issues_count":12,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-11-14T19:31:23.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"milanvrekic/JS-humanize","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taijinlee.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":"2012-05-18T22:32:43.000Z","updated_at":"2025-04-07T21:04:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/taijinlee/humanize","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/taijinlee/humanize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taijinlee%2Fhumanize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taijinlee%2Fhumanize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taijinlee%2Fhumanize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taijinlee%2Fhumanize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taijinlee","download_url":"https://codeload.github.com/taijinlee/humanize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taijinlee%2Fhumanize/sbom","scorecard":{"id":865807,"data":{"date":"2025-08-11","repo":{"name":"github.com/taijinlee/humanize","commit":"2b088754676d280a291c25f0b210e895b40dc9e7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/26 approved changesets -- score normalized to 1","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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 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-24T02:40:16.242Z","repository_id":3330511,"created_at":"2025-08-24T02:40:16.242Z","updated_at":"2025-08-24T02:40:16.242Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284614662,"owners_count":27035322,"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-11-15T02:00:06.050Z","response_time":57,"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":"2025-11-13T01:00:34.904Z","updated_at":"2025-11-16T12:01:01.220Z","avatar_url":"https://github.com/taijinlee.png","language":"JavaScript","readme":"# humanize #\n\nJavascript data formatter for human readability.\n\nIdea, name, and initial code blatently stolen from [milanvrekic/JS-humanize](http://github.com/milanvrekic/JS-humanize)\n\nCan be loaded via AMD or in node directly.\n\n## Installation ##\n\n    npm install humanize\n\n## Usage: ##\n```javascript\nvar humanize = require('humanize');\nhumanize.date('Y-m-d'); // 'yyyy-mm-dd'\nhumanize.filesize(1234567890); // '1.15 Gb'\n```\n\n## Functions available: ##\n\n####humanize.noConflict()####\nGive control of the \"humanize\" variable back to its previous owner. Returns a reference to the humanize object.\n\n####humanize.time()####\nRetrieves the current time in seconds\n\n####humanize.date(format [, timestamp / JS Date Object = new Date()])####\nThis is a port of [php.js date](http://phpjs.org/functions/date:380) and behaves exactly like [PHP's date](http://php.net/manual/en/function.date.php)\n\n####humanize.numberFormat(number [, decimals = 2, decPoint = '.', thousandsSep = ','])####\nFormat a number to have decimal significant decimal places, using decPoint as the decimal separator, and thousandsSep as thousands separater\n\n####humanize.naturalDay(timestamp [, format = 'Y-m-d'])####\nReturns 'today', 'tomorrow' or 'yesterday', as appropriate, otherwise format the date using the passed format with humanize.date()\n\n####humanize.relativeTime(timestamp)####\nReturns a relative time to the current time, seconds as the most granular up to years to the least granular.\n\n####humanize.ordinal(integer)####\nConverts a number into its [ordinal representation](http://en.wikipedia.org/wiki/Ordinal_number_\\(linguistics\\)).\n\n####humanize.filesize(filesize [, kilo = 1024, decimals = 2, decPoint = '.', thousandsSep = ',']) ####\nConverts a byte count to a human readable value using kilo as the basis, and numberFormat formatting\n\n####humanize.linebreaks(string)####\nConverts a string's newlines into properly formatted html ie. one new line -\u003e br, two new lines -\u003e p, entire thing wrapped in p\n\n####humanize.nl2br(string)####\nConverts a string's newlines into br's\n\n####humanize.truncatechars(string, length)####\nTruncates a string to length-1 and appends '…'. If string is shorter than length, then no-op\n\n####humanize.truncatewords(string, numWords)####\nTruncates a string to only include the first numWords words and appends '…'. If string has fewer words than numWords, then no-op\n","funding_links":[],"categories":["Packages","Number"],"sub_categories":["Humanize"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaijinlee%2Fhumanize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaijinlee%2Fhumanize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaijinlee%2Fhumanize/lists"}