Global

Members

(constant) DependencyType :String

Source:
Properties:
Name Type Description
EqualTo String
GreaterThan String
GreaterThanOrEqual String

The possible types of a module dependency.

Type:
  • String

Methods

camelCase(str) → {String}

Source:
To Do:
  • Move to a static method or seperate file.
  • Write unit tests.

Creates a camel-cased version of a string.

Parameters:
Name Type Description
str String

the incoming text

Returns:

a camel-cased version of the string.

Type
String

objMap(obj, cb) → {Object}

Source:
To Do:
  • Move to a static method or seperate file.
  • Write unit tests.

Array.map() for objects. Walks through each property in the object and creates an object after running each key through cb.

Parameters:
Name Type Description
obj Object

the object to iterate through.

cb function

called for each property in obj. Return undefined to remove a key. Otherwise, the returned value will be added to the output object under the same key.

Returns:

The result of running each property in obj through cb.

Type
Object

Type Definitions

ModArray

Source:

An array of Factorio Mods, useful for documenting return types inside Promises. Use {Promise<ModArray>} instead of {Promise<Array<Mod>>}.

Type:

ModDependency

Source:
Properties:
Name Type Description
optional Boolean

true if the mod dependency is optional.

name String

the name of the required mod.

type DependencyType

the type of dependency.

version String

the version dependency of the mod. Defaults to "0.0.0.0".

The details of a mod dependency.

Type:
  • Object

ModuleLoaderOptions

Source:
Properties:
Name Type Description
factorioPath String

Required The directory where Factorio is installed.

factorioDataPath String

the directory containing Factorio's core mods. Defaults to factorioPath + "/data".

factorioModPath String

the directory containing user-added mods. Defaults to factorioPath + "/mods"

factorioModList String

the JSON file listing which mods are enabled. Defaults to factorioModPath + "/mod-list.json"

vanilla Boolean

if true, the vanilla game components will be added to the output. Defaults to true.

added Boolean

if true, user-added mods will be added to the output. Defaults to true.

Options to configure finding modules.

Type:
  • Object