{"id":15486765,"url":"https://github.com/conejerock/nuxt-flags","last_synced_at":"2026-05-16T11:01:37.593Z","repository":{"id":214319757,"uuid":"736232869","full_name":"conejerock/nuxt-flags","owner":"conejerock","description":"Nuxt3 module to use Feature Flags toggle feature services.","archived":false,"fork":false,"pushed_at":"2023-12-27T10:59:33.000Z","size":150,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T13:47:42.493Z","etag":null,"topics":["composables","feature-flags","modules","nuxt","nuxt3","plugins"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nuxt-flags","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/conejerock.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-27T10:43:55.000Z","updated_at":"2024-01-22T10:02:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"be4457da-6437-4b66-8288-81f49245bae4","html_url":"https://github.com/conejerock/nuxt-flags","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"4249c902bdbc364c7957ba82aaf407a32d57996f"},"previous_names":["conejerock/nuxt-flags"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/conejerock/nuxt-flags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conejerock%2Fnuxt-flags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conejerock%2Fnuxt-flags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conejerock%2Fnuxt-flags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conejerock%2Fnuxt-flags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conejerock","download_url":"https://codeload.github.com/conejerock/nuxt-flags/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conejerock%2Fnuxt-flags/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["composables","feature-flags","modules","nuxt","nuxt3","plugins"],"created_at":"2024-10-02T06:09:37.469Z","updated_at":"2026-05-16T11:01:37.559Z","avatar_url":"https://github.com/conejerock.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nuxt Flags Module\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![License][license-src]][license-href]\n[![Nuxt][nuxt-src]][nuxt-href]\n\n[Nuxt module](nuxt-href) to use Feature Flags (as [Unleash](https://github.com/Unleash/unleash) used by [Gitlab](https://docs.gitlab.com/ee/operations/feature_flags.html)) toggle feature services. Compatible with **Nuxt3**\n\n- [✨ \u0026nbsp;Release Notes](/CHANGELOG.md)\n- [🏀 Online playground](https://stackblitz.com/edit/nuxt-flags?file=nuxt.config.ts)\n\n\n_If you want to use Nuxt2, please visit [nuxt-unleash](https://github.com/conejerock/nuxt-unleash)_\n\n## Quick Setup\n\n1. Add `nuxt-flags` dependency to your project\n\n```bash\n# Using pnpm\npnpm add -D nuxt-flags\n\n# Using yarn\nyarn add --dev nuxt-flags\n\n# Using npm\nnpm install --save-dev nuxt-flags\n```\n\n2. Add `nuxt-flags` to the `modules` section of `nuxt.config.ts`\n\n```js\nexport default defineNuxtConfig({\n  modules: [\n    'nuxt-flags'\n  ]\n})\n```\n\nThat's it! You can now use Nuxt Flags Module in your Nuxt app ✨\n\n## Module options\n\nTo configure Nuxt Flags, you can pass the flags options.\n```typescript\n// nuxt.config.ts\nexport default defineNuxtConfig({\n    flags: {\n        url: 'https://example.com/api/v4/feature_flags/unleash/42',\n        instanceId: '29QmjsW6KngPR5JNPMWx',\n        appName: 'production'\n    }\n})\n```\nFor all options available, please refer to TSDocs in your IDE, or the [type definition file](https://github.com/conejerock/nuxt-flags/blob/main/src/options.ts).\n## Usage\n\n### useNuxtFlags\nTo use `nuxt-flags` in your NuxtApp, call composable `useNuxtFlags()` \n```vue\n\u003ctemplate\u003e\n  \u003cdiv v-if=\"myFeatureFlag.enabled\"\u003e\n    Show feature for {{myFeatureFlag.description}}\n  \u003c/div\u003e\n  \u003cdiv v-else\u003e\n    No show feature\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript setup lang=\"ts\"\u003e\nconst {get} = useNuxtFlags()\nconst myFeatureFlag = get('my-feature-flag') \n\u003c/script\u003e\n```\n\nIts recommended use `useNuxtFlag` to acquire feature flags. However, you can also access the flags using the plugin syntax `$flags`. \n```typescript\nconst { get } = useNuxtApp().$flags\n```\n\n## API\n\nThe module provides four methods:\n\n### exists\nReturns whether a feature flag exists\n\n```typescript\n// exists(name: string)\nconst { exists } = useNuxtFlags()\nexists('new-feature')\n```\n\n### isEnabled\nIf the feature flag exists, return its status value.\n\n```typescript\n// isEnabled(name: string)\nconst { isEnabled } = useNuxtFlags()\nisEnabled('new-feature')\n```\n\n### isAllowUser\nIf feature flag has the strategy `userWithId` as user list (comma separated), returns whether *myUsername* is in the user list of `userIds`.\n```typescript\n// isAllowUser(name: string, username: string)\nconst { isAllowUser } = useNuxtFlags()\nisAllowUser('new-feature', 'myUsername')\n```\n\n### isAllowIP\nIf feature flag has the strategy `userWithId` as IP list (comma separated), returns whether the current request IP is in the IP list of `userIds`.\n```typescript\n// isAllowIP(name: string)\nconst { isAllowIP } = useNuxtFlags()\nisAllowIP('new-feature')\n```\n\n### get\nReturns feature flag data (can be undefined)\n\n```typescript\n// get(name: string)\nconst { get } = useNuxtFlags()\nget('new-feature')\n```\n\n### getAll\nReturns all feature flags data\n\n```typescript\n// getAll()\nconst { getAll } = useNuxtFlags()\ngetAll()\n```\n\n## Development\n\n1. Clone this repository\n2. Install dependencies using `yarn install` or `npm install`\n3. Start development server using `npm run dev`\n\n## License\n\n[MIT License](./LICENSE)\n\n\nCopyright (c) Conejerock\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: https://img.shields.io/npm/v/nuxt-flags/latest.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-version-href]: https://npmjs.com/package/nuxt-flags\n\n[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-flags.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[npm-downloads-href]: https://npmjs.com/package/nuxt-flags\n\n[license-src]: https://img.shields.io/npm/l/nuxt-flags.svg?style=flat\u0026colorA=18181B\u0026colorB=28CF8D\n[license-href]: https://npmjs.com/package/nuxt-flags\n\n[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js\n[nuxt-href]: https://nuxt.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconejerock%2Fnuxt-flags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconejerock%2Fnuxt-flags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconejerock%2Fnuxt-flags/lists"}