https://github.com/claeusdev/launch-lever
Manage your feature toggles quickly
https://github.com/claeusdev/launch-lever
javascript nodejs react reactjs typescript
Last synced: 6 months ago
JSON representation
Manage your feature toggles quickly
- Host: GitHub
- URL: https://github.com/claeusdev/launch-lever
- Owner: claeusdev
- Created: 2024-03-19T20:23:06.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-26T09:35:28.000Z (about 1 year ago)
- Last Synced: 2025-06-30T09:07:44.160Z (7 months ago)
- Topics: javascript, nodejs, react, reactjs, typescript
- Language: TypeScript
- Homepage:
- Size: 158 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
## Launch-Lever
[](https://www.npmjs.com/package/launch-lever)
The easiest way to manage feature toggles in JS/TS applications.
### Features
- Currently only supports managing feature toggles using JSON
- Should be super fast 💨
### About
`launch-lever` is a simple library for managing your feature toggles.
launch-lever is for you if you want:
- A simple locally managed feature toggle.
- Something so simple you don't need to know how to make network calls to use.
- Build your toggle JSON and push the launch button.
### Installation
To add `launch-lever` to your project:
```js
npm install launch-lever
```
```js
yarn add launch-lever
```
### Usage
launch-lever exports a class `LaunchLever` together with some types for `Toggle`.
```js
import { Toggle, LaunchLever, isOn } from "launch-lever";
// export interface Toggle {
// name: string;
// description: string;
// status: "on" | "off";
// }
export const flags: Toggle[] = [
{
name: "pfx_123",
description: "A very simple test case",
status: "on"
},
{
name: "pfx_1255",
description: "A very simple test case",
status: "off"
}
]
```
Pass your JSON to the constructor.
```ts
const { pfx_123, pfx_1255 } = new LaunchLever(flags).flags
```
Use your toggle names by simply checking if they're turned `on` with the very handy `isOn` function.
```ts
if(isOn(pfx_123)) {
//show some button
}
```
### Contributing and Support
If you're interested in contributing or supporting. Just fork, open a PR.