Skip to content

Commit

Permalink
fix: rename pkg to toggled (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
rqbazan authored Nov 6, 2021
1 parent 7c2c3f8 commit 065c328
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
</h1>

<p align="center">
<a href="https://npmjs.org/package/featureflag">
<img alt="NPM version" src="https://img.shields.io/npm/v/featureflag.svg?style=for-the-badge">
<a href="https://npmjs.org/package/toggled">
<img alt="NPM version" src="https://img.shields.io/npm/v/toggled.svg?style=for-the-badge">
</a>
<a href="https://github.com/rqbazan/ff">
<img alt="LICENSE" src="https://img.shields.io/github/license/rqbazan/ff?style=for-the-badge">
</a>
<a href="https://github.com/rqbazan/ff/actions/workflows/main.yml">
<img alt="CI" src="https://img.shields.io/github/workflow/status/rqbazan/ff/CI?label=CI&style=for-the-badge">
</a>
<a href="https://bundlephobia.com/package/featureflag">
<img alt="Size" src="https://img.shields.io/bundlephobia/minzip/featureflag?style=for-the-badge">
<a href="https://bundlephobia.com/package/toggled">
<img alt="Size" src="https://img.shields.io/bundlephobia/minzip/toggled?style=for-the-badge">
</a>
</p>

Expand All @@ -29,13 +29,13 @@ Tiny library to use [feature flags](https://martinfowler.com/articles/feature-to
NPM:

```sh
npm i featureflag
npm i toggled
```

Yarn:

```sh
yarn add featureflag
yarn add toggled
```

## API
Expand All @@ -55,11 +55,11 @@ export interface DefaultFeature {
#### Example

```ts
// src/types/featureflag.d.ts
import 'featureflag'
// src/types/toggled.d.ts
import 'toggled'

// extend the interface if needed
declare module 'featureflag' {
declare module 'toggled' {
export interface DefaultFeature {
slug: string
settings?: any
Expand Down Expand Up @@ -95,7 +95,7 @@ interface FeatureProviderProps<F extends DefaultFeature = DefaultFeature> {
#### Example

```tsx
import { FeatureProvider } from 'featureflag'
import { FeatureProvider } from 'toggled'
import apiClient from './api-client'
import App from './app'

Expand Down Expand Up @@ -125,7 +125,7 @@ interface UseFeature<F extends DefaultFeature = DefaultFeature> {

```tsx
// src/app.tsx
import { useFeature } from 'featureflag'
import { useFeature } from 'toggled'

function App() {
const themeFF = useFeature('theme')
Expand Down Expand Up @@ -157,7 +157,7 @@ interface UseFlagQuery {
#### Example

```tsx
import { useFlagQuery } from 'featureflag'
import { useFlagQuery } from 'toggled'

export default function App() {
const flagQuery = useFlagQuery()
Expand Down Expand Up @@ -187,7 +187,7 @@ interface UseFlag {
#### Example
```tsx
import { useFlag } from 'featureflag'
import { useFlag } from 'toggled'

export default function App() {
const hasChat = useFlag('chat')
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "featureflag",
"name": "toggled",
"private": false,
"author": {
"name": "Ricardo Q. Bazan",
"email": "[email protected]",
"url": "https://sxntixgo.codes"
"url": "https://rcrd.space"
},
"description": "Tiny library to use feature flags on React",
"version": "0.0.0-development",
Expand All @@ -15,7 +15,7 @@
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
"module": "dist/featureflag.esm.js",
"module": "dist/toggled.esm.js",
"files": [
"dist",
"src",
Expand Down Expand Up @@ -71,11 +71,11 @@
},
"size-limit": [
{
"path": "dist/featureflag.cjs.production.min.js",
"path": "dist/toggled.cjs.production.min.js",
"limit": "300 B"
},
{
"path": "dist/featureflag.esm.js",
"path": "dist/toggled.esm.js",
"limit": "350 B"
}
]
Expand Down

0 comments on commit 065c328

Please sign in to comment.