This commit is contained in:
Luke committed 2023-06-04 15:15:21 +02:00
1 parent 3cebaf7fa5
commit b5eba8423f
229 files changed
+6238 -10690

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
### lib.checkDependency
Check if a resource is using a specified version or higher, allowing for compatibility checks or throwing errors.
import { Tabs, Tab } from 'nextra-theme-docs';
```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>