{"id":15674897,"url":"https://github.com/jonschlinkert/unique-words","last_synced_at":"2025-09-01T09:35:57.315Z","repository":{"id":15433953,"uuid":"18166581","full_name":"jonschlinkert/unique-words","owner":"jonschlinkert","description":"Return the unique words in a string or array.","archived":false,"fork":false,"pushed_at":"2018-07-17T13:30:49.000Z","size":14,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-06T22:13:57.561Z","etag":null,"topics":["array","javascript","language","string","unique","uniquify","words"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","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/jonschlinkert.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":"2014-03-27T06:30:42.000Z","updated_at":"2022-09-25T06:58:45.000Z","dependencies_parsed_at":"2022-08-25T18:02:36.866Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/unique-words","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jonschlinkert/unique-words","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funique-words","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funique-words/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funique-words/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funique-words/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/unique-words/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Funique-words/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260742578,"owners_count":23055804,"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":["array","javascript","language","string","unique","uniquify","words"],"created_at":"2024-10-03T15:52:44.749Z","updated_at":"2025-06-19T11:34:33.266Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unique-words [![NPM version](https://img.shields.io/npm/v/unique-words.svg?style=flat)](https://www.npmjs.com/package/unique-words) [![NPM monthly downloads](https://img.shields.io/npm/dm/unique-words.svg?style=flat)](https://npmjs.org/package/unique-words) [![NPM total downloads](https://img.shields.io/npm/dt/unique-words.svg?style=flat)](https://npmjs.org/package/unique-words) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/unique-words.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/unique-words)\n\n\u003e Returns an array of unique words, or the number of occurrences of each word in a string or list.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save unique-words\n```\n\n## Usage\n\n```js\nconst unique = require('unique-words');\n\nconsole.log(unique('one two one two three'));\n// =\u003e ['one', 'two', 'three']\n\nconsole.log(unique(['foo', 'foo', 'foo bar', 'bar', 'bar baz foo']));\n// =\u003e ['foo', 'bar', 'baz']\n```\n\n## .counts\n\nA `.counts()` method is exposed for getting the number of occurrences of each word.\n\n```js\nconsole.log(unique.counts('one two one two three'));\n//=\u003e { one: 2, three: 1, two: 2 }\n```\n\n## Case sensitivity\n\nNote that words are case-sensitive. To get non-case-sensitive results, make all strings lower- or upper-case before passing them in.\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](http://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 17, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Funique-words","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Funique-words","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Funique-words/lists"}