Namespaces
Members
(private, static, constant) byte2humanUnits_ :array.<string>
Byte to human unit string array.
Type:
- array.<string>
(private, static, constant) byte2humanUnitsLength_ :integer
Byte to human unit string array size.
Type:
- integer
Methods
(static) byte2human(size, reverse, fake) → {string}
Size in bytes to human readable size.
Parameters:
Name | Type | Description |
---|---|---|
size |
number | string | A number representing size in bytes. |
reverse |
boolean | A boolean flag to reverse the math (human -> bytes). |
fake |
boolean | A boolean flag to reverse the math (human -> bytes). |
Returns:
- Type
- string
Example
var humanSize = noop.byte2human(4194304, false, false);
(static) has(name) → {boolean}
Check that module exists.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | A module name. |
Returns:
- Type
- boolean
Example
var hasAjax = noop.has('ajax');
(static) isArray(x) → {boolean}
Test that the given value is an array.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isArray = noop.isArray([1, 2, 3]);
(static) isBoolean(x) → {boolean}
Test that the given value is a boolean.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isBoolean = noop.isBoolean(true);
(static) isDefined(x) → {boolean}
Test that the given value is defined.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isDefined = noop.isDefined(null);
(static) isEmpty(x) → {boolean}
Test that the given value is empty.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isEmpty = noop.isEmpty([]);
(static) isEqual(a, b) → {boolean}
Test that the given values are equal.
Parameters:
Name | Type | Description |
---|---|---|
a |
any | The first value. |
b |
any | The second value. |
Returns:
- Type
- boolean
Example
var isEqual = noop.isEqual(211, 211);
(static) isFloat(x) → {boolean}
Test that the given value is a float.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isFloat = noop.isFloat(2.11);
(static) isFunction(x) → {boolean}
Test that the given value is a function.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isFunction = noop.isFunction(() => {});
(static) isInteger(x) → {boolean}
Test that the given value is an integer.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isInteger = noop.isInteger(211);
(static) isNaN(x) → {boolean}
Test that the given value is NaN.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isNaN = noop.isNaN(NaN);
(static) isNull(x) → {boolean}
Test that the given value is null.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isNull = noop.isNull(null);
(static) isNumber(x) → {boolean}
Test that the given value is a number.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isNumber = noop.isNumber(211);
(static) isObject(x) → {boolean}
Test that the given value is an object.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isObject = noop.isObject({hello: 'World'});
(static) isSet(x) → {boolean}
Test that the given value is set.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isSet = noop.isSet(window.noop);
(static) isString(x) → {boolean}
Test that the given value is a string.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isString = noop.isString('Hello World!');
(static) isSymbol(x) → {boolean}
Test that the given value is a symbol.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isSymbol = noop.isSymbol(Symbol());
(static) isType(x, t) → {boolean}
Test that the given value is a given type.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
t |
string | The type to be expected. |
Returns:
- Type
- boolean
Example
var isType = noop.isType({}, 'object');
(static) isUndefined(x) → {boolean}
Test that the given value is undefined.
Parameters:
Name | Type | Description |
---|---|---|
x |
any | The value to be tested. |
Returns:
- Type
- boolean
Example
var isUndefined = noop.isUndefined(undefined);
(static) modules() → {array.<string>}
Return name list of loaded NOOP modules.
Returns:
- Type
- array.<string>
Example
var modules = noop.modules();