{"id":28752342,"url":"https://github.com/viktor-maksimov/array-of-objects-functions","last_synced_at":"2025-06-16T23:39:23.722Z","repository":{"id":35093589,"uuid":"200520906","full_name":"viktor-maksimov/array-of-objects-functions","owner":"viktor-maksimov","description":"Useful functions to use with array of objects.","archived":false,"fork":false,"pushed_at":"2022-01-29T21:14:28.000Z","size":20,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-26T18:15:58.658Z","etag":null,"topics":["array","array-of-objects","es6","find","javascript","objects","remove","typescript","unique","unique-values","values"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/viktor-maksimov.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":"2019-08-04T17:15:48.000Z","updated_at":"2023-08-15T23:58:35.000Z","dependencies_parsed_at":"2022-08-08T05:00:49.463Z","dependency_job_id":null,"html_url":"https://github.com/viktor-maksimov/array-of-objects-functions","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/viktor-maksimov/array-of-objects-functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-maksimov%2Farray-of-objects-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-maksimov%2Farray-of-objects-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-maksimov%2Farray-of-objects-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-maksimov%2Farray-of-objects-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viktor-maksimov","download_url":"https://codeload.github.com/viktor-maksimov/array-of-objects-functions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktor-maksimov%2Farray-of-objects-functions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260261912,"owners_count":22982705,"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","array-of-objects","es6","find","javascript","objects","remove","typescript","unique","unique-values","values"],"created_at":"2025-06-16T23:39:19.798Z","updated_at":"2025-06-16T23:39:23.705Z","avatar_url":"https://github.com/viktor-maksimov.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Array of Objects\n\nUseful functions to help working with Javascript Array of Objects\n\n\u003cbr /\u003e\n\n\u003ca href=\"https://www.npmjs.com/package/array-of-objects-functions\"\u003e\n  \u003cimg src=\"https://camo.githubusercontent.com/890acbdcb87868b382af9a4b1fac507b9659d9bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://www.npmjs.com/package/array-of-objects-functions\"\u003e\n  \u003cimg src=\"https://camo.githubusercontent.com/cf80a63dc680fa3e0d2f6b729fea1a0a14ae5a1e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f7665726167652d3130302532352d627269676874677265656e2e737667\" /\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://www.npmjs.com/package/array-of-objects-functions\"\u003e\n  \u003cimg src=\"https://camo.githubusercontent.com/d4e0f63e9613ee474a7dfdc23c240b9795712c96/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667\" /\u003e\n\u003c/a\u003e\n\n## Usage\n\n### Install the package\n\npackage.json\n```\n{\n  \"dependencies\": {\n    \"array-of-objects-functions\": \"latest\"\n  }\n}\n```\n\nAfter that (with Yarn):\n```\nyarn install\n```\n\nOr with NPM:\n```\nnpm install\n```\n\nAnd finally you can use it in your project:\n```\nimport { getUniqueValues } from \"array-of-objects-functions\"\n\nconst arrayOfObjects = [\n  {\n    name: \"John\"\n  },\n  {\n    name: \"James\"\n  },\n  {\n    name: \"John\"\n  }\n]\n\nconst uniqueNames = getUniqueValues(arrayOfObjects, \"name\")\n```\n\n## Functions\n\n### 1) getUniqueValues(arrayOfObjects, propertyName)\n\nThis function returns an array containing only the unique values of a specific property in the objects. It accepts as parameters first the ArrayOfObjects and second - a string of the property name.\n\n### 2) findFirstOneMatching(arrayOfObjects, propertyName, propertyValue)\n\n### 3) findLastOneMatching(arrayOfObjects, propertyName, propertyValue)\n\n### 4) findAllMatching(arrayOfObjects, propertyName, propertyValue)\n\n### 5) removeFirstOneMatching(arrayOfObjects, propertyName, propertyValue)\n\n### 6) removeLastOneMatching(arrayOfObjects, propertyName, propertyValue)\n\n### 7) removeAllMatching(arrayOfObjects, propertyName, propertyValue)\n\n## Contribution\n\nEverybody can contribute\n\n### Useful commands (examples with yarn)\n\nBuild your code:\n```\nyarn build\n```\n\nRun tests:\n```\nyarn test\n```\n\nGenerate test coverage:\n```\nyarn test:coverage\n```\n\nRun ESLint:\n```\nyarn lint\n```\n\n### Important\n\nPlease before opening a PR for this package - run tests and eslint and fix the errors in your code.\nAlso for new functions - please add tests.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktor-maksimov%2Farray-of-objects-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviktor-maksimov%2Farray-of-objects-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktor-maksimov%2Farray-of-objects-functions/lists"}