Files
overextended.github.io/pages/ox_lib/Modules/Version/Shared.mdx
T
JagandLuke 1d2c490b26 refactor: Add h1 headers to all pages missing it (#137)
* refactor: Add h1 headers to all pages missing it

* refactor: missed example h3

* change hooks example heading to bold text

---------

Co-authored-by: Luke <[email protected]>
2023-07-08 11:08:43 +02:00

31 lines
682 B
Plaintext

import { Tabs, Tab } from 'nextra-theme-docs';
# Shared
## lib.checkDependency
Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors.
```lua
lib.checkDependency(resource, version)
```
- resource: `string`
- version: `string`
<Tabs items={["Lua", "JS"]}>
<Tab>
```lua
if not lib.checkDependency('ox_lib', '1.5.0') then error() end
```
</Tab>
<Tab>
```ts
import lib from '@overextended/ox_lib/shared'
// import { checkDependency } from '@overextended/ox_lib/shared'
if (!lib.checkDependency('ox_lib', '1.5.0')) error()
```
</Tab>
</Tabs>