Module: Core
Iniquity Core
summary
This is the Iniquity core bbs library. It’s the foundation of any Iniquity application.
example
import BBS from "@iniquitybbs/core"
const mybbs = new BBS()
myIniquity.artwork({ filename: "./path/to/textfile.ans" }).render({ speed: 10 })
myIniquity.say("Pretty cool, right???".newlines(2).color("bright cyan").center()).pause()
myIniquity.disconnect()
Table of contents
References
Namespaces
Enumerations
Classes
Interfaces
- IBBSPrintFunctions
- IBBSSayFunctions
- IMenuCommand
- IMenuCommands
- IQArtworkOptions
- IQArtworkRenderFunctions
- IQArtworkRenderOptions
- IQCursorChainableMethods
- IQCursorOptions
- IQFrameOptions
- IQMenuLoopMessageResponse
- IQMenuLoopOptions
- IQMenuOptions
- IQMenuPromptFunctions
- IQMenuPromptOptions
- IQModuleOptions
- IQModuleRuntimeOptions
- IQPauseOptions
- IQPrintOptions
- IQReactorOptions
- IQStringUtils
- IQTermInfoObject
- IQWaitOptions
- IUserOptions
Variables
Functions
References
IQCoreAssets
• IQCoreAssets: Object
Defined in
Variables
default
• default: Iniquity
The globally scoped intance of iniquity
Defined in
Functions
IQModule
▸ IQModule(options
): (constructor
: Function
) => void
An experimental Iniquity module decorator for bbs modules
author
ispyhumanfly
Parameters
Name | Type |
---|---|
options |
IQModuleOptions |
Returns
fn
▸ (constructor
): void
Parameters
Name | Type |
---|---|
constructor |
Function |
Returns
void
Defined in
IQModuleRuntime
▸ IQModuleRuntime(options?
): any
The IQ script executed as part of a module.
Parameters
Name | Type |
---|---|
options? |
IQModuleRuntimeOptions |
Returns
any
Defined in
IQReactor
▸ IQReactor(dataObj
): IQReactorOptions
Iniquity reactive data model
see
https://www.monterail.com/blog/2016/how-to-build-a-reactive-engine-in-javascript-part-1-observable-objects
Parameters
Name | Type |
---|---|
dataObj |
any |
Returns
Defined in
cursor
▸ cursor(options?
): IQCursorChainableMethods
A pretty cool method for working with cursor movement.
example
cursor().down(10).up(12).down().up().down().left(1).right(20).down(12).up(14)
Parameters
Name | Type |
---|---|
options? |
IQCursorOptions |
Returns
Defined in
gotoxy
▸ gotoxy(x
, y
): void
Parameters
Name | Type |
---|---|
x |
number |
y |
number |
Returns
void
Defined in
pause
▸ pause(options?
): void
Parameters
Name | Type |
---|---|
options? |
IQPauseOptions |
Returns
void
Defined in
randomAsset
▸ randomAsset(assets
): string
Return a single asset random selected from an array of IQCoreAssets
Parameters
Name | Type | Description |
---|---|---|
assets |
string [] |
An array of IQCoreAssets to choose from |
Returns
string
The randomly selected asset
Defined in
say
▸ say(options?
): IBBSSayFunctions
Say whatever you want, but to the screen
example
say(“are we making it here?”).pause()
Parameters
Name | Type |
---|---|
options? |
any |
Returns
Defined in
wait
▸ wait(options?
): void
Parameters
Name | Type |
---|---|
options? |
number | IQWaitOptions |
Returns
void