Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 months ago
JSON representation
how wonderful thursday!!!!
- Host: GitHub
- URL: https://github.com/crazy-thursday/usekfc
- Owner: crazy-thursday
- License: mit
- Created: 2022-12-01T05:23:41.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-18T01:45:24.000Z (over 1 year ago)
- Last Synced: 2024-10-10T09:06:01.106Z (4 months ago)
- Topics: astro, hooks, infomation, kfc, react, slogen, thursday, use-kfc, vue
- Language: TypeScript
- Homepage: https://use-kfc.deno.dev
- Size: 1.33 MB
- Stars: 17
- Watchers: 0
- Forks: 1
- Open Issues: 14
-
Metadata Files:
- Readme: README.CN.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
英文 |
中文
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