Files
ox_lib/package/README.md

38 lines
809 B
Markdown
Raw Normal View History

2022-09-18 12:37:03 +02:00
# 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.
2023-11-07 18:57:26 +01:00
You still need to use and have the ox_lib resource included into the resource you are using the npm package in.
2022-09-18 12:37:03 +02:00
## Installation
```yaml
# With pnpm
2025-05-02 15:44:52 +02:00
pnpm add @communityox/ox_lib
2022-09-18 12:37:03 +02:00
# With Yarn
2025-05-02 15:44:52 +02:00
yarn add @communityox/ox_lib
2022-09-18 12:37:03 +02:00
# With npm
2025-05-02 15:44:52 +02:00
npm install @communityox/ox_lib
2022-09-18 12:37:03 +02:00
```
## Usage
You can either import the lib from client or server files or deconstruct the object and import only certain functions
you may require.
```ts
2025-05-02 15:44:52 +02:00
import lib from '@communityox/ox_lib/client'
2022-09-18 12:37:03 +02:00
```
```ts
2025-05-02 15:44:52 +02:00
import lib from '@communityox/ox_lib/server'
2022-09-18 12:37:03 +02:00
```
```ts
2025-05-02 15:44:52 +02:00
import { checkDependency } from '@communityox/ox_lib/shared';
2022-09-18 12:37:03 +02:00
```
## Documentation
2025-05-02 15:44:52 +02:00
[View documentation](https://coxdocs.dev/ox_lib)