{"id":24961977,"url":"https://github.com/broisnischal/prisma-fns","last_synced_at":"2025-04-10T21:40:45.851Z","repository":{"id":219134282,"uuid":"748251409","full_name":"broisnischal/prisma-fns","owner":"broisnischal","description":"a revolutionary utility extension for seamless Prisma integration.","archived":false,"fork":false,"pushed_at":"2024-06-06T02:14:48.000Z","size":380,"stargazers_count":39,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T12:12:07.199Z","etag":null,"topics":["prisma","prisma-extension","prisma-orm"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/prisma-fns","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/broisnischal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-01-25T15:37:14.000Z","updated_at":"2025-01-10T12:26:30.000Z","dependencies_parsed_at":"2024-01-25T17:27:21.381Z","dependency_job_id":"be53988f-e128-4341-86bf-f3beae241006","html_url":"https://github.com/broisnischal/prisma-fns","commit_stats":null,"previous_names":["broisnischal/prisma-fns"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broisnischal%2Fprisma-fns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broisnischal%2Fprisma-fns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broisnischal%2Fprisma-fns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/broisnischal%2Fprisma-fns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/broisnischal","download_url":"https://codeload.github.com/broisnischal/prisma-fns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248305783,"owners_count":21081561,"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":["prisma","prisma-extension","prisma-orm"],"created_at":"2025-02-03T08:58:20.046Z","updated_at":"2025-04-10T21:40:45.833Z","avatar_url":"https://github.com/broisnischal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prisma-Fns\n\n\u003c!-- [![Build Status](https://travis-ci.org/broisnischal/prisma-fns.svg?branch=master)](https://travis-ci.org/broisnischal/prisma-fns) --\u003e\n\n[![npm version](https://img.shields.io/npm/v/prisma-fns.svg)](https://www.npmjs.com/package/prisma-fns)\n![GitHub Repo stars](https://img.shields.io/github/stars/broisnischal/prisma-fns?style=social)\n![GitHub top language](https://img.shields.io/github/languages/top/broisnischal/prisma-fns?style=plastic)\n[![License](https://img.shields.io/npm/l/prisma-fns.svg)](https://opensource.org/licenses/MIT)\n\nPrisma-Fns is a revolutionary utility extension for seamless Prisma integration. It enhances your workflow, simplifies common tasks and functions, and boosts the efficiency of your Prisma-powered applications.\n\n## Installation\n\n```bash\nnpm install prisma-fns\n```\n\n## Basic Usage\n\n#### Get Values\n\n```ts\n// getValues (field, where)\nconst prisma = new PrismaClient().$extends(getValues);\n\nconst user = await prisma.user.getValues(\"email\", {\n  email: {\n    contains: \"@\",\n  },\n});\n```\n\n#### Log\n\n```ts\n// console.log\nconst prisma = new PrismaClient().$extends(log);\n\nconst user = await prisma.user.findFirst();\n\nprisma.$log(user);\n```\n\n#### Exists\n\n```ts\nconst prisma = new PrismaClient().$extends(exists);\n\n// returns boolean\nconst user = await prisma.user.exists({\n  id: 1,\n});\n```\n\n#### logPerf\n\n```ts\nconst prisma = new PrismaClient().$extends(logPerf);\n\nconst user = await prisma.user.findFirst();\n\n\n// logs in console\n{\n  model: 'User',\n  operation: 'findFirst',\n  args: {},\n  time: 25.3997129797935\n}\n```\n\n#### remember\n\n```ts\n// creates singleton\nconst prisma = new PrismaClient().$extends(remember);\n```\n\n#### save\n\n```ts\n// saves object\nconst prisma = new PrismaClient().$extends(save);\n```\n\n#### generate slug\n\n```ts\nconst prisma = new PrismaClient().$extends(generateSlug);\n\nconst user = await prisma.user.findFirst();\n\n// returns slug\nuser.slug;\n```\n\n## Progress\n\n- [ ] Custom Generators\n- [x] Extensions\n  - [x] Generate Singleton client\n  - [ ] Fuzzy search feature for specified model\n  - [ ] Increase Decrease Math Operations for field in provided model\n  - [ ] Pagination utils\n  - [ ] Luxon for date time fields\n  - [ ] Query Optimization Extension\n    - [ ] Toggle via slug\n    - [ ] Compare and Update\n    - [ ] Auto select field/model\n    - [ ] auto generate slug in provided model\n    - [ ] deselect password when querying\n    - [ ] more coming soon...\n  - [ ] Extras\n    - [x] log perf logger\n    - [ ] coming up\n- [ ] Docs website\n  - [ ] Create docs website\n  - [ ] Example Implementation\n- [ ] Tests\n  - [ ] Unit tests\n    - [ ] extensions\n- [x] Deploy to production\n  - [x] Set up hosting environment\n  - [x] Configure CI/CD pipeline\n  - [x] Deploy package\n\n### Contributing\n\nIf you'd like to contribute, please follow our contribution guidelines.\n\n## Support\n\nIf you like the project, please consider supporting us by giving a ⭐️ on Github.\n\n### Bugs\n\nIf you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/broisnischal/prisma-fns/issues)\n\n### License\n\nprisma-fns is open-source software licensed under the MIT [license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroisnischal%2Fprisma-fns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbroisnischal%2Fprisma-fns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroisnischal%2Fprisma-fns/lists"}