mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
* feat(notify): add option to show duration lib.notify new option `showDuration?: boolean -- Option to show duration bar` * fix(notify): allow icon color using hexadecimal values * chore(notify): show duration to default and added tinycolor2 for supporting available color formats * feat(notify): define interface for showDuration
ox_lib JS/TS wrapper
Not all ox_lib functions found in Lua are supported, the ones that are will have a JS/TS example on the documentation.
You still need to use and have the ox_lib resource included into the resource you are using the npm package in.
Installation
# With pnpm
pnpm add @overextended/ox_lib
# With Yarn
yarn add @overextended/ox_lib
# With npm
npm install @overextended/ox_lib
Usage
You can either import the lib from client or server files or deconstruct the object and import only certain functions you may require.
import lib from '@overextended/ox_lib/client'
import lib from '@overextended/ox_lib/server'
import { checkDependency } from '@overextended/ox_lib/shared';