{"id":25648760,"url":"https://github.com/vandie/ocucount.js","last_synced_at":"2026-05-17T10:36:00.703Z","repository":{"id":57313425,"uuid":"83553552","full_name":"vandie/OcuCount.JS","owner":"vandie","description":"A tiny ( 3 KB ) NodeJS module to perform word counts on single or arrays of strings.","archived":false,"fork":false,"pushed_at":"2017-03-04T14:38:32.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-24T23:08:42.463Z","etag":null,"topics":["array","count","cross-platform","library","node","nodejs","ocucount","small","string","wordcount"],"latest_commit_sha":null,"homepage":"","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/vandie.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":"2017-03-01T12:45:30.000Z","updated_at":"2025-02-21T08:39:28.000Z","dependencies_parsed_at":"2022-09-20T23:10:56.941Z","dependency_job_id":null,"html_url":"https://github.com/vandie/OcuCount.JS","commit_stats":null,"previous_names":["vandie/ocucount"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/vandie/OcuCount.JS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandie%2FOcuCount.JS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandie%2FOcuCount.JS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandie%2FOcuCount.JS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandie%2FOcuCount.JS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vandie","download_url":"https://codeload.github.com/vandie/OcuCount.JS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandie%2FOcuCount.JS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33135105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["array","count","cross-platform","library","node","nodejs","ocucount","small","string","wordcount"],"created_at":"2025-02-23T13:19:09.460Z","updated_at":"2026-05-17T10:36:00.676Z","avatar_url":"https://github.com/vandie.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OcuCount\nA tiny NodeJS module to perform wordcounts on single or arrays of strings.\n\n[![npm](https://img.shields.io/npm/v/ocucount.svg?style=flat-square)](https://www.npmjs.com/package/ocucount)\n[![npm](https://img.shields.io/npm/dt/ocucount.svg?style=flat-square)](https://www.npmjs.com/package/ocucount)\n\n#Installation\nInstallation is very simple due to OcuCount being on NPM. Simply type: `npm install ocucount` from a console in the project directory then add `var ocucount = require('ocucount');` to the top of your project file.\n\n#Usage\nUsage of OcuCount is fairly simple. It has as few functions as possible to keep the size down and ease of use high.\n\n##For a single strings\nFor single strings simply use the following function:\n```javascript\nvar wordcount = ocucount.count('What are you doing my friend? you are a good friend');\n```\nSimply replace the test string with the string you want to perform the wordcount on. In this example, wordcount would be the following:\n```javascript\n[\n    word { word: 'what', count: 1 },\n    word { word: 'are', count: 2 },\n    word { word: 'you', count: 2 },\n    word { word: 'doing', count: 1 },\n    word { word: 'my', count: 1 },\n    word { word: 'friend', count: 2 },\n    word { word: 'a', count: 1 },\n    word { word: 'good', count: 1 } \n]\n\n```\n\n##For multiple strings\nOcuCount can also be used on arrays of stings. For example:\n```javascript\nvar wordcount = ocucount.count(['What are you doing my friend?','You are a good friend.','But I love you!']);\n```\nIn this example, wordcount would be:\n```javascript\n[\n    word { word: 'what', count: 1 },\n    word { word: 'are', count: 2 },\n    word { word: 'you', count: 3 },\n    word { word: 'doing', count: 1 },\n    word { word: 'my', count: 1 },\n    word { word: 'friend', count: 2 },\n    word { word: 'a', count: 1 },\n    word { word: 'good', count: 1 },\n    word { word: 'but', count: 1 },\n    word { word: 'i', count: 1 },\n    word { word: 'love', count: 1 }\n]\n```\n\n##Sorting Ocucount word lists\nOcucount does not default to sorting your lists of words. To do that, simply call the following:\n```javascript\n//create an OcuCount word list\nvar wordcount = ocucount.count(['What are you doing my friend?','You are a good friend.','But I love you!']);\n//sort it\nwordcount = ocucount.sortWords(wordcount);\n```\nThis will return the list generated by the other main Ocucount function but sorted from lowest to highest usage.\n\n---\n\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/vandie/OcuCount/blob/master/LICENSE)\n\n---\n\nFollow me on twitter ([@MVD_Vandie](https://twitter.com/MVD_Vandie)) or on github in order to keep track of my projects and releases.\n\n[![Twitter Follow](https://img.shields.io/twitter/follow/mvd_vandie.svg?label=Follow%20on%20Twitter\u0026style=flat-square)](https://twitter.com/MVD_Vandie) \n[![GitHub followers](https://img.shields.io/github/followers/vandie.svg?label=Follow%20on%20Github\u0026style=flat-square)](https://github.com/vandie)\n\nEnjoy. :D","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvandie%2Focucount.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvandie%2Focucount.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvandie%2Focucount.js/lists"}