Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/crazy-thursday/usekfc

how wonderful thursday!!!!
https://github.com/crazy-thursday/usekfc

astro hooks infomation kfc react slogen thursday use-kfc vue

Last synced: about 14 hours ago
JSON representation

how wonderful thursday!!!!

Awesome Lists containing this project

README

        



kfc logo





英文 |
中文





npm package
node compatibility
build status
discord chat





useKFC


生成疯狂星期四的文字!!!




## Usage

- hooks 🌩

```tsx
import useKFC, { useParseSlogen } from '@crazy-thursday/use-kfc'
// if u not have exists slogenList, use package json
import slogenLike from '@crazy-thursday/use-kfc/slogen'

/**
* @description slogen item struct
*/
export type SlogenItem = {
/**
* @description slogen content message
*/
content: string
/**
* @description slogen id to avoid repeat
*/
id: string | number
}

export type Options = {
/**
* @description is provide, slogen will random from this array
*/
slogenList: SlogenItem[]
/**
* @description manual refresh slogen
*/
refreshSignal?: T
/**
* @description whether skip thursday check
*/
skipDayCheck?: boolean
}

function App() {
const slogenList = useParseSlogen(slogenLike)
const { slogen } = useKFC({
slogenList
})

return {

{slogen}

}
}
```

- api 💻

```bash
$ curl 'https://use-kfc-serve.deno.dev/kfc'
```

- data struct 📚

```ts
export enum CODE {
/**
* @description success code
*/
SUCCESS = 10086,
/**
* @description failed code
*/
FAILED = 10087,
/**
* @description deny code
*/
DENY = 10089
}

type DataStruct = {
code: CODE
ip: string
method: 'GET'
data: {
content: string
id: string
createUser: string
}
}
```

## Slogen

仓库内置了部分 slogen. 此外你也可以使用 issue 来进行 slogen 贡献. 但请确保 issue 包含完整且不带有争议的文字或表情. 在完成内容编辑之后增加 slogen 的标签. Github CI 会自动收集你贡献的内容到仓库内.

## Contribution

查看 [贡献指南](CONTRIBUTING.md).

## License

[MIT](LICENSE).

## Sponsoring