mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
* 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]>
31 lines
682 B
Plaintext
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>
|