Global

Members

(constant) clients :Array.<string>

Source:
Type:
  • Array.<string>

(constant) clients :Array.<string>

Source:
Type:
  • Array.<string>

(constant) DefaultParams :mainjs.params

Source:
Type:

(constant) DefaultParams :mainjs.params

Source:
Type:

Methods

_assert() → {boolean}

Assertion utility function

Source:
Returns:
Type:
boolean

b32hex(b32) → {string}

Dencodes Base32 string

Source:
Parameters:
Name Type Description
b32 string

Base32 encoded string

Returns:
Type:
string

Hex

bits2hex(bits) → {string}

Converts binary bits to hex string

Source:
Parameters:
Name Type Description
bits string
Returns:
Type:
string

hex

bits2uintN(n, bits) → {Array.<number>}

Converts a bits string to an array of N-bit unsigned integers

Source:
Parameters:
Name Type Description
n number

Number of bits

bits string

Bits string

Returns:
Type:
Array.<number>

Array of N-bit unsigned integers

bytes2b11(bytes) → {Array.<number>}

Converts array of bytes into array of 11-bit numbers

Source:
Parameters:
Name Type Description
bytes Array.<number>

Array of bytes

Returns:
Type:
Array.<number>

Array of 11-bit numbers

compose(…fns) → {any}

Chains functions together and passes return value to the next function as an argument

Source:
Parameters:
Name Type Attributes Description
fns any <repeatable>

List of functions

Returns:
Type:
any
Example
f1 = x => x**2
f2 = y => y-1
c1 = z => compose(f1,f2)(z)
c1(5) // returns 24
c1(4) // returns 15

copyTargetValue(e) → {void}

Copies to clipboard the value of clicked element

Source:
Parameters:
Name Type Description
e document#event:click

Click event

Listens to Events:
Returns:
Type:
void

copyTargetValue(e) → {void}

Copies to clipboard the value of clicked element

Source:
Parameters:
Name Type Description
e document#event:click

Click event

Listens to Events:
Returns:
Type:
void

D() → {string}

Returns current viewport breakpoint

Source:
Returns:
Type:
string

Abbreviated breakpoint (xs|sm|md|lg|xl|xxl)

D() → {string}

Returns current viewport breakpoint

Source:
Returns:
Type:
string

Abbreviated breakpoint (xs|sm|md|lg|xl|xxl)

hex2b32(hex) → {string}

Encodes Hex into Base32

Source:
Parameters:
Name Type Description
hex string
Returns:
Type:
string

Base32 encoded string

hex2bits(hex) → {string}

Converts hex string to binary bits

Source:
Parameters:
Name Type Description
hex string
Returns:
Type:
string

bits

randomArray(size) → {Promise.<Array.<number>>}

Generates random bytes array using a CSPRNG module

Source:
Parameters:
Name Type Description
size number

Number of bytes

Returns:
Type:
Promise.<Array.<number>>

Array of bytes

randomHex(size) → {string}

Generates random bytes array in hexadecimal

Source:
Parameters:
Name Type Description
size number

Number of bytes

Returns:
Type:
string

Hex

range(n, oopt) → {Array}

Generates array with numbers from 0 [+ offset] to N [+ offset]

Source:
Parameters:
Name Type Attributes Default Description
n number

Size of array

o number <optional>
0

Offset

Returns:
Type:
Array

Array with N numbers

splitter(s, n)

Split string every N position

Source:
Parameters:
Name Type Description
s string

String to split

n number
Returns:

uintN2bits(n, u) → {string}

Converts array of N-bit unsigned integers to bits string

Source:
Parameters:
Name Type Description
n number

Number of bits per number

u Array.<number>

Array of N-bit unsigned integers

Returns:
Type:
string

bits

Type Definitions

Status

Properties:
Name Type Description
done number

Completed task

wip number

Work in progress

err number

There was an error

Source:
Type:
  • Object

Status

Properties:
Name Type Description
done number

Completed task

wip number

Work in progress

err number

There was an error

Source:
Type:
  • Object