docs » cp.ids
Allows managing values/IDs which can vary between versions.
- Functions - API calls offered directly by the extension
- new
- Methods - API calls which can only be made on an object returned by a constructor
- currentVersion
- load
- of
- ofCurrent
- previousVersion
- versions
| Signature | cp.ids.new(path[, currentVersionFn]) -> cp.ids |
|---|---|
| Type | Function |
| Description | Creates a new ids instance with the specified path to the version files and |
| Parameters |
|
| Returns |
|
| Signature | cp.ids:currentVersion() -> semver |
|---|---|
| Type | Method |
| Description | Returns the current version number for the IDs library. May be nil. |
| Parameters |
|
| Returns |
|
| Signature | cp.ids:load([version]) -> table |
|---|---|
| Type | Method |
| Description | Loads and caches IDs for the given version. It will search through previous versions, |
| Parameters |
|
| Returns |
|
| Signature | cp.ids:of(version, subset) -> function |
|---|---|
| Type | Method |
| Description | Returns a function which can be called to retrieve a specific value for the specified version. |
| Parameters |
|
| Returns |
|
| Signature | cp.ids:ofCurrent(subset) -> function |
|---|---|
| Type | Method |
| Description | Returns a function which can be called with an ID to retrieve a specific value for the current version. |
| Parameters |
|
| Returns |
|
| Signature | cp.ids:previousVersion([version]) -> semver |
|---|---|
| Type | Method |
| Description | Returns the previous version number that has stored IDs. |
| Parameters |
|
| Returns |
|
| Signature | cp.ids:versions() -> table |
|---|---|
| Type | Method |
| Description | Returns a table of versions. |
| Parameters |
|
| Returns |
|