@quizeo/use-flags
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

@quizeo/use-flags

/!\ Private usage only.

Usage

Install

Use npm i @quizeo/use-flags

Implementation

import { useFlags } from '@quizeo/use-flags'

function App() {
    const { flags, isFlagOn, getFlag } = useFlags({ apiUrl: '...', apiServiceToken: '...' })
}

Reference

useFlags

Function

Parameters

  • Object :
{
    apiUrl: <string>
    apiServiceToken`: <string>
}

flags

List all flags that are available (on or off) for the specific service.

Property

Array<{
    key: string
    enabled: boolean
    variant: string
}>

isFlagOn

Function that tell if a flag is on or off.

Parameter

  • key: string

Return

true|false

getFlag

Function that return a flag.

Paremeter

  • key: string

Return

{
    key: string
    enabled: boolean
    variant: string
}

Readme

Keywords

none

Package Sidebar

Install

npm i @quizeo/use-flags

Weekly Downloads

0

Version

1.2.2

License

ISC

Unpacked Size

15.4 kB

Total Files

9

Last publish

Collaborators

  • wawa27
  • marcanta
  • levrairiri