{"id":16223680,"url":"https://github.com/lykmapipo/kue-unique","last_synced_at":"2025-06-15T17:34:38.254Z","repository":{"id":1226193,"uuid":"41878342","full_name":"lykmapipo/kue-unique","owner":"lykmapipo","description":"Unique job utility for kue","archived":false,"fork":false,"pushed_at":"2023-01-06T17:38:04.000Z","size":3620,"stargazers_count":22,"open_issues_count":22,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-11T12:19:35.727Z","etag":null,"topics":["kue","queue","unique"],"latest_commit_sha":null,"homepage":null,"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/lykmapipo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2015-09-03T19:03:28.000Z","updated_at":"2023-03-28T05:20:30.000Z","dependencies_parsed_at":"2023-01-11T15:50:17.138Z","dependency_job_id":null,"html_url":"https://github.com/lykmapipo/kue-unique","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fkue-unique","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fkue-unique/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fkue-unique/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lykmapipo%2Fkue-unique/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lykmapipo","download_url":"https://codeload.github.com/lykmapipo/kue-unique/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221663488,"owners_count":16859831,"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":["kue","queue","unique"],"created_at":"2024-10-10T12:19:44.168Z","updated_at":"2024-10-27T10:33:01.478Z","avatar_url":"https://github.com/lykmapipo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kue-unique\n\n[![Build Status](https://travis-ci.org/lykmapipo/kue-unique.svg?branch=master)](https://travis-ci.org/lykmapipo/kue-unique)\n[![Dependencies Status](https://david-dm.org/lykmapipo/kue-unique.svg)](https://david-dm.org/lykmapipo/kue-unique)\n[![Coverage Status](https://coveralls.io/repos/github/lykmapipo/kue-unique/badge.svg?branch=master)](https://coveralls.io/github/lykmapipo/kue-unique?branch=master)\n[![GitHub License](https://img.shields.io/github/license/lykmapipo/kue-unique)](https://github.com/lykmapipo/kue-unique/blob/master/LICENSE)\n\n[![Commitizen Friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![Code Style](https://badgen.net/badge/code%20style/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n[![npm version](https://img.shields.io/npm/v/kue-unique)](https://www.npmjs.com/package/kue-unique)\n\nUnique job utility for [kue](https://github.com/Automattic/kue). If `job` already exists it will return it, otherwise it will create a new `job` and return it.\n\n## Requirements\n\n- [NodeJS v14.5+](https://nodejs.org)\n- [Npm v6.14+](https://www.npmjs.com/)\n\n## Installation\n\n```sh\n$ npm install --save kue kue-unique\n```\n\n## Usage\n\n```js\nimport kue from 'kue-unique';\nconst queue = kue.createQueue();\n\n// create and save unique job\nconst job = queue.create('email', {\n    title: 'welcome email for tj'\n  , to: 'tj@learnboost.com'\n  , template: 'welcome-email'\n})\n.unique(\u003cjob_unique_identifier\u003e)\n.save((error, job) =\u003e {\n   if( !error ) {\n        console.log( job.id );\n    }\n});\n\n// removing existing unique job\njob.remove( (error, job) =\u003e {\n   if( !error ) {\n        console.log( job.id );\n    }\n})\n```\n\n## Testing\n\n- Clone this repository\n\n- Install all development dependencies\n\n```sh\nnpm install\n```\n\n- Run example\n\n```sh\nnpm run examples\n```\n\n- Then run test\n\n```sh\nnpm test\n```\n\n## Contribute\n\nIt will be nice, if you open an issue first so that we can know what is going on, then, fork this repo and push in your ideas. Do not forget to add a bit of test(s) of what value you adding.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) lykmapipo \u0026 Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fkue-unique","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flykmapipo%2Fkue-unique","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flykmapipo%2Fkue-unique/lists"}