Function
Static Public Summary | ||
public |
Wrap binary data in DataView |
|
public |
hasProperty(name: string): boolean Checks if environment provides a feature |
|
public |
Check if given object is an array |
|
public |
Check if given object is a Uint8Array |
|
public |
Check if given object is a boolean |
|
public |
Check if given object is a Date |
|
public |
Check if given object is a float number |
|
public |
isFunction(n: *): boolean Check if given object is a function |
|
public |
isInfinity(n: *): boolean Check if given object is infinity constant |
|
public |
Check if given object is an integer number |
|
public |
Check if given object is null |
|
public |
Check if given object is a number |
|
public |
Check if given object is an object |
|
public |
Check if given object is a string |
|
public |
isUndefined(n: *): boolean Check if given object is undefined |
|
public |
Return the next multiple of four |
|
public |
prepareAddress(obj: string[] | string): string Sanitizes an OSC-ready Address Pattern |
|
public |
prepareRegExPattern(str: string): string Make an OSC address pattern javascript-regex-ready |
|
public |
Checks type of given object and returns the regarding OSC Type tag character |
Static Public
public dataView(obj: *): DataView source
import {dataView} from 'osc-js/src/common/utils.js'
Wrap binary data in DataView
Params:
Name | Type | Attribute | Description |
obj | * |
public hasProperty(name: string): boolean source
import {hasProperty} from 'osc-js/src/common/utils.js'
Checks if environment provides a feature
Params:
Name | Type | Attribute | Description |
name | string | Name of needed feature |
public isArray(n: *): boolean source
import {isArray} from 'osc-js/src/common/utils.js'
Check if given object is an array
Params:
Name | Type | Attribute | Description |
n | * |
public isBlob(n: *): boolean source
import {isBlob} from 'osc-js/src/common/utils.js'
Check if given object is a Uint8Array
Params:
Name | Type | Attribute | Description |
n | * |
public isBoolean(n: *): boolean source
import {isBoolean} from 'osc-js/src/common/utils.js'
Check if given object is a boolean
Params:
Name | Type | Attribute | Description |
n | * |
public isDate(n: *): boolean source
import {isDate} from 'osc-js/src/common/utils.js'
Check if given object is a Date
Params:
Name | Type | Attribute | Description |
n | * |
public isFloat(n: *): boolean source
import {isFloat} from 'osc-js/src/common/utils.js'
Check if given object is a float number
Params:
Name | Type | Attribute | Description |
n | * |
public isFunction(n: *): boolean source
import {isFunction} from 'osc-js/src/common/utils.js'
Check if given object is a function
Params:
Name | Type | Attribute | Description |
n | * |
public isInfinity(n: *): boolean source
import {isInfinity} from 'osc-js/src/common/utils.js'
Check if given object is infinity constant
Params:
Name | Type | Attribute | Description |
n | * |
public isInt(n: *): boolean source
import {isInt} from 'osc-js/src/common/utils.js'
Check if given object is an integer number
Params:
Name | Type | Attribute | Description |
n | * |
public isNull(n: *): boolean source
import {isNull} from 'osc-js/src/common/utils.js'
Check if given object is null
Params:
Name | Type | Attribute | Description |
n | * |
Test:
public isNumber(n: *): boolean source
import {isNumber} from 'osc-js/src/common/utils.js'
Check if given object is a number
Params:
Name | Type | Attribute | Description |
n | * |
public isObject(n: *): boolean source
import {isObject} from 'osc-js/src/common/utils.js'
Check if given object is an object
Params:
Name | Type | Attribute | Description |
n | * |
public isString(n: *): boolean source
import {isString} from 'osc-js/src/common/utils.js'
Check if given object is a string
Params:
Name | Type | Attribute | Description |
n | * |
public isUndefined(n: *): boolean source
import {isUndefined} from 'osc-js/src/common/utils.js'
Check if given object is undefined
Params:
Name | Type | Attribute | Description |
n | * |
Test:
public pad(n: number): * source
import {pad} from 'osc-js/src/common/utils.js'
Return the next multiple of four
Params:
Name | Type | Attribute | Description |
n | number |
Return:
* |
Test:
public prepareAddress(obj: string[] | string): string source
import {prepareAddress} from 'osc-js/src/common/helpers.js'
Sanitizes an OSC-ready Address Pattern
Example:
// all calls return '/test/path' string:
prepareAddress('test/path')
prepareAddress('/test/path/')
prepareAddress([test, path])
Test:
public prepareRegExPattern(str: string): string source
import {prepareRegExPattern} from 'osc-js/src/common/helpers.js'
Make an OSC address pattern javascript-regex-ready
Params:
Name | Type | Attribute | Description |
str | string | OSC address pattern |
public typeTag(item: *): string source
import {typeTag} from 'osc-js/src/common/helpers.js'
Checks type of given object and returns the regarding OSC Type tag character
Params:
Name | Type | Attribute | Description |
item | * | Any object |