Home Manual Reference Source Test

References

summary
public

This class lies at the very base of this library.

public

Corrode A batteries-included library for reading your binary data.

public

The VariableStack is a special kind of stack.

assert

summary
public

F allEqual(name: string, testValue: mixed)

assert deep equality each value in Object|Array

public

F arrayLength(name: string, length: number | string)

assert array to be a given length

public

F bitmask(name: string, mask: number, assertMatch: boolean)

asserts a variable matches a given bitmask

public

F callback(name: string, fn: function, testname: string)

assert value via callback

public

F deepEqual(name: string, value: object)

assert equality objects

public

F equal(name: string, value: mixed)

assert strict equal single value

public

F exists(name: string)

asserts a variable exists in the first place

public

F inBounds(name: string, value: array)

assert value to be within the bounds of an array

public

F includes(name: string, arr: array | object)

assert array|object to contain item

map

summary
public

F bitmask(name: string, maskObject: Object | number): *

map a value by checking whether it has some bits set

public

F callback(name: string, fn: function(val: *))

replace a variable in the stack by a mapped version of itself

public

F find(name: string, array: Array<Object>, attr: string, src: string)

retrieve the first object from an array of objects, matching a specified attribute against a specified value like findAll, but returning only the first element

public

F findAll(name: string, array: Array<Object>, attr: string, src: string)

retrieve a filtered array of objects from an array of objects, matching a specified attribute against a specified value

public

F get(name: string, accessable: array | object | string, src: string)

retrieve a value from an accessable type (like array[0] or object['foo'])

public

F push(name: string)

replace Corrode#vars completely with a value from Corrode#vars especially useful when pushing a variable further up in the stack

public

retrieve absolute value of a number Math.abs

public

retrieve inverted number

public

retrieve trimmed string

utils

summary
public

F bindObject(obj: object, ctx: object): object

bind each function in an object to a given context

public

bind each function in an object with a tap to a given context

Directories