Skip to content

Releases: crazy-thursday/useKFC

🍟 useKFC V1.2.0

17 Dec 11:08
Compare
Choose a tag to compare

🍟 useKFC V1.1.0

16 Dec 03:36
Compare
Choose a tag to compare

What's Changed

  • feat: add next Slogen button by @TinsFox in #5
  • feat(markdown): support markdown & fix theme error by @innocces in #8

New Contributors

Full Changelog: https://github.com/crazy-thursday/useKFC/compare/V1.0.0...@crazy-thursday/use-kfc@1.1.0

🍟 useKFC V1.0.0

04 Dec 14:56
Compare
Choose a tag to compare

publish 🍟 useKFC V1.0.0

Usage

  • hooks 🌩
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<T> = {
  /**
   * @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 {
    <pre>{slogen}</pre>
  }
}
  • api 💻
$ curl 'https://use-kfc-serve.deno.dev/kfc'
  • data struct 📚
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
  }
}

Full Changelog: https://github.com/crazy-thursday/useKFC/commits/V1.0.0