ids

Last updated 2 months ago

Allows managing values/IDs which can vary between versions.

API Overview

API Documentation

Functions

new

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

Methods

Signature

cp.ids:currentVersion() -> semver

Type

Method

Description

Returns the current version number for the IDs library. May be nil.

Parameters

Returns

load

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

of

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

ofCurrent

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