@carlsebastian/jsu 1.0.50 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.MD +1 -1
- package/global.js +1 -1
- package/package.json +10 -2
- package/src/docs/api/api.md +3 -2
- package/src/docs/custom/custom.md +13 -33
- package/src/docs/custom/error/builder/builder.md +24 -0
- package/src/docs/custom/error/constructor/error.constructor.md +33 -0
- package/src/docs/custom/error/constructor/opts/argumentError.md +78 -0
- package/src/docs/custom/error/constructor/opts/indexOutOfBounds.md +77 -0
- package/src/docs/custom/error/constructor/opts/invalidPropertyError.md +83 -0
- package/src/docs/custom/error/constructor/opts/missingParameterError.md +75 -0
- package/src/docs/custom/error/constructor/opts/missingPropertyError.md +81 -0
- package/src/docs/custom/error/constructor/opts/noSuchElementTagError.md +81 -0
- package/src/docs/custom/error/constructor/opts/notSupportedError.md +81 -0
- package/src/docs/custom/error/constructor/opts/unknownPropertyError.md +82 -0
- package/src/docs/custom/error/error.md +36 -0
- package/src/docs/custom/utils/clamp.md +8 -6
- package/src/docs/custom/utils/constructorOrTypeOf.md +8 -6
- package/src/docs/custom/utils/generator/generator.md +8 -6
- package/src/docs/custom/utils/generator/methods/generator.newToken.md +11 -8
- package/src/docs/custom/utils/generator/methods/generator.randomCharacters.md +11 -8
- package/src/docs/custom/utils/generator/methods/generator.randomInteger.md +11 -8
- package/src/docs/custom/utils/nameOf.md +8 -6
- package/src/types/api/api.d.ts +27 -9
- package/src/types/arithmetic/arithmetic.d.ts +281 -0
- package/src/types/custom/error/builder/error.builder.d.ts +1 -1
- package/src/types/custom/error/constructor/error.custom.d.ts +24 -8
- package/src/types/custom/error/constructor/error.meta.d.ts +6 -6
- package/src/types/custom/utils/custom.utils.d.ts +83 -0
- package/src/types/global.d.ts +5 -3
- package/src/utils/arithmetic/arithmetic.js +20 -0
- package/src/utils/arithmetic/operations/operation.divide.js +78 -0
- package/src/utils/arithmetic/operations/operation.multiply.js +75 -0
- package/src/utils/arithmetic/operations/operation.subtract.js +64 -0
- package/src/utils/arithmetic/operations/operation.sum.js +65 -0
- package/src/utils/custom/error/builder/error.builder.js +3 -3
- package/src/utils/custom/error/error.js +2 -2
- package/src/utils/custom/utils/custom.utils.js +68 -4
- package/src/utils/custom/utils/generator/generator.js +4 -4
- package/src/utils/dom/attr/attr.class.js +4 -4
- package/src/utils/dom/attr/attr.id.js +3 -3
- package/src/utils/dom/attr/attr.style.js +5 -5
- package/src/utils/dom/element/create/element.create.js +14 -14
- package/src/utils/dom/element/getElementBy/dom.getElementBy.js +6 -6
- package/src/utils/dom/element/query/dom.query.js +3 -3
- package/src/utils/dom/element/tag-verifier/verifier.js +5 -5
- package/src/utils/dom/lifecycle/mount.js +3 -3
- package/src/utils/dom/lifecycle/unmount.js +2 -2
- package/src/utils/storage/local/storage.local.js +3 -3
- package/src/utils/storage/session/storage.session.js +3 -3
- package/src/utils/storage/storage.js +2 -2
- package/src/utils/variables.js +13 -7
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# JSU - ERROR API - Constructors.NoSuchElementTagError()
|
|
2
|
+
|
|
3
|
+
## Table Of Contents
|
|
4
|
+
|
|
5
|
+
- [JSU - ERROR API - Constructors.NoSuchElementTagError()](#jsu---error-api---constructorsnosuchelementtagerror)
|
|
6
|
+
- [Table Of Contents](#table-of-contents)
|
|
7
|
+
- [What it does?](#what-it-does)
|
|
8
|
+
- [Parameter](#parameter)
|
|
9
|
+
- [Properties](#properties)
|
|
10
|
+
- [Example Usage](#example-usage)
|
|
11
|
+
- [Navigate To](#navigate-to)
|
|
12
|
+
|
|
13
|
+
## What it does?
|
|
14
|
+
|
|
15
|
+
- It raises a report on your project's runtime about a provided unknown or not-qualified element's tag of `Element`.
|
|
16
|
+
|
|
17
|
+
## Parameter
|
|
18
|
+
|
|
19
|
+
- `meta` - The meta data object of this error.
|
|
20
|
+
- `meta.Message` - The message of this error. ( **_Required_** )
|
|
21
|
+
- `meta.Context` - The meta context object of this error.
|
|
22
|
+
- `meta.Context.Message` - A context message that points the root cause of error.
|
|
23
|
+
- `meta.Context.Emitter` - The source id of an object that is responsible of raising this error.
|
|
24
|
+
- `meta.Args` - A meta argument object of this error to check the reported arguments.
|
|
25
|
+
- `meta.Args.Id` - The reported argument id that cause this error.
|
|
26
|
+
- `meta.Args.Tag` - The provided unknown or not-qualified tag of element.
|
|
27
|
+
- `meta.Args.TagOf` - The element type or instance that does not have the provided tag. (Options: **_HTMLElement_**, **_MathMLElement_**, **_SVGElement_**)
|
|
28
|
+
- `Guide` - A guide for fixing this error.
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
- `Message` - The message of this error.
|
|
33
|
+
- `Context` - The context object of this error.
|
|
34
|
+
- `Args` - The arguments object of this error.
|
|
35
|
+
- `Guide` - A provided guide for fixing this error.
|
|
36
|
+
- `TimeStamp` - A record of date & time of when this error has occurred.
|
|
37
|
+
|
|
38
|
+
## Example Usage
|
|
39
|
+
|
|
40
|
+
```js
|
|
41
|
+
function CreateElement(tag) {
|
|
42
|
+
if (tag === null || tag === undefined || typeof tag !== "string" || tag.trim().length === 0) return null;
|
|
43
|
+
|
|
44
|
+
// #: VariablesAPI.HTMLElementTags - Provided collection of HTMLElements tag.
|
|
45
|
+
if (!Variables.HTMLElementTags.has(tag))
|
|
46
|
+
throw new ERROR.Constructor.NoSuchElementTag({
|
|
47
|
+
Message: `A not-qualified HTMLElement tag is found at CreateElement()!`,
|
|
48
|
+
Context: {
|
|
49
|
+
Message: `CreateElement(@tag: ${tag}): Unknown HTMLElement Tag`,
|
|
50
|
+
Emitter: "CreateElement",
|
|
51
|
+
},
|
|
52
|
+
Args: {
|
|
53
|
+
Id: "tag",
|
|
54
|
+
Tag: tag,
|
|
55
|
+
TagOf: "HTMLElement",
|
|
56
|
+
},
|
|
57
|
+
Guide: "Ensure to provided a qualified HTMLElement tag!",
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return document.createElement(tag);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
CreateElement("dib"); // Uncaught NoSuchElementTagError: ...
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Navigate To
|
|
67
|
+
|
|
68
|
+
- [Error](../../error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
69
|
+
- [Constructors](../error.constructor.md) - *A collection of customized error class constructors.*
|
|
70
|
+
- [ArgumentError()](./argumentError.md) - *A custom version of Javascript's **TypeError** for invalid arguments types.*
|
|
71
|
+
- [IndexOutOfBoundsError()](./indexOutOfBounds.md) - *A custom version of Javascript's **RangeError** for index that exceeded the maximum index-bound of an object.*
|
|
72
|
+
- [InvalidPropertyError()](./invalidPropertyError.md) - *A custom error class for objects with invalid property.*
|
|
73
|
+
- [MissingParameterError()](./missingParameterError.md) - *A custom error class for parameters that does not provided a data.*
|
|
74
|
+
- [MissingPropertyError()](./missingPropertyError.md) - *A custom error class for incomplete or missing key-pair data of an object.*
|
|
75
|
+
- [NotSupportedError()](./notSupportedError.md) - *A custom error class for not supported **objects**, **methods**, and/or **functions**.*
|
|
76
|
+
- [UnknownPropertyError()](./unknownPropertyError.md) - *A custom error class for unknown property that is trying to be access from an object.*
|
|
77
|
+
- [Raise](../../builder/builder.md) - *A collection of pre-defined contents builder and raiser of errors.*
|
|
78
|
+
|
|
79
|
+
- [JSU - README](../../../../../../README.MD) - _JSU Homepage Documentation._
|
|
80
|
+
- [APIs](../../../../api/api.md) - \*A complete collection list of available APIs of **_JSU_**.\*
|
|
81
|
+
- [Custom](../../../custom.md) - _An API that provides a collection of customized and/or enhanced utilities or objects._
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# JSU - ERROR API - Constructors.NotSupportedError()
|
|
2
|
+
|
|
3
|
+
## Table Of Contents
|
|
4
|
+
|
|
5
|
+
- [JSU - ERROR API - Constructors.NotSupportedError()](#jsu---error-api---constructorsnotsupportederror)
|
|
6
|
+
- [Table Of Contents](#table-of-contents)
|
|
7
|
+
- [What it does?](#what-it-does)
|
|
8
|
+
- [Parameter](#parameter)
|
|
9
|
+
- [Properties](#properties)
|
|
10
|
+
- [Example Usage](#example-usage)
|
|
11
|
+
- [Navigate To](#navigate-to)
|
|
12
|
+
|
|
13
|
+
## What it does?
|
|
14
|
+
|
|
15
|
+
- It raises a report on your project's runtime when a certain functions, methods, or API are was accessed but not supported.
|
|
16
|
+
|
|
17
|
+
## Parameter
|
|
18
|
+
|
|
19
|
+
- `meta` - The meta data object of this error.
|
|
20
|
+
- `meta.Message` - The message of this error. ( **_Required_** )
|
|
21
|
+
- `meta.Context` - The meta context object of this error.
|
|
22
|
+
- `meta.Context.Message` - A context message that points the root cause of error.
|
|
23
|
+
- `meta.Context.Emitter` - The source id of an object that is responsible of raising this error.
|
|
24
|
+
- `meta.Args` - A meta argument object of this error to check the reported arguments.
|
|
25
|
+
- `meta.Args.Id` - The object id that is being access but not supported.
|
|
26
|
+
- `Guide` - A guide for fixing this error.
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
- `Message` - The message of this error.
|
|
31
|
+
- `Context` - The context object of this error.
|
|
32
|
+
- `Args` - The arguments object of this error.
|
|
33
|
+
- `Guide` - A provided guide for fixing this error.
|
|
34
|
+
- `TimeStamp` - A record of date & time of when this error has occurred.
|
|
35
|
+
|
|
36
|
+
## Example Usage
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
const IsLocalStorageAPISupported = (function () {
|
|
40
|
+
try {
|
|
41
|
+
const Key = "__TEST_KEY__";
|
|
42
|
+
localStorage.setItem(Key, "__TEST__");
|
|
43
|
+
localStorage.removeItem(Key);
|
|
44
|
+
|
|
45
|
+
return true;
|
|
46
|
+
} catch (e) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
})()
|
|
50
|
+
|
|
51
|
+
// #: Will throw when your or user's environment does not support LocalStorageAPI.
|
|
52
|
+
if (!IsLocalStorageAPISupported)
|
|
53
|
+
throw new ERROR.Constructors.NotSupportedError({
|
|
54
|
+
Message: "LocalStorageAPI is not supported!",
|
|
55
|
+
Context: {
|
|
56
|
+
Message: "LocalStorageAPI is not currently supported on user's current browser environment!",
|
|
57
|
+
Emitter: "foo"
|
|
58
|
+
},
|
|
59
|
+
Args: {
|
|
60
|
+
Id: "LocalStorage"
|
|
61
|
+
},
|
|
62
|
+
Guide: "Try to update your current browser environment to its latest update or switch to another browser such as 'Chrome', 'FireFox' or 'Brave'."
|
|
63
|
+
});
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Navigate To
|
|
67
|
+
|
|
68
|
+
- [Error](../../error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
69
|
+
- [Constructors](../error.constructor.md) - *A collection of customized error class constructors.*
|
|
70
|
+
- [ArgumentError()](./argumentError.md) - *A custom version of Javascript's **TypeError** for invalid arguments types.*
|
|
71
|
+
- [IndexOutOfBoundsError()](./indexOutOfBounds.md) - *A custom version of Javascript's **RangeError** for index that exceeded the maximum index-bound of an object.*
|
|
72
|
+
- [InvalidPropertyError()](./invalidPropertyError.md) - *A custom error class for objects with invalid property.*
|
|
73
|
+
- [MissingParameterError()](./missingParameterError.md) - *A custom error class for parameters that does not provided a data.*
|
|
74
|
+
- [MissingPropertyError()](./missingPropertyError.md) - *A custom error class for incomplete or missing key-pair data of an object.*
|
|
75
|
+
- [NoSuchElementTagError()](./noSuchElementTagError.md) - *A custom error class for unknown or not qualified **HTMLElement**, **MathMLElement**, **SVGElement** tags.*
|
|
76
|
+
- [UnknownPropertyError()](./unknownPropertyError.md) - *A custom error class for unknown property that is trying to be access from an object.*
|
|
77
|
+
- [Raise](../../builder/builder.md) - *A collection of pre-defined contents builder and raiser of errors.*
|
|
78
|
+
|
|
79
|
+
- [JSU - README](../../../../../../README.MD) - *JSU Homepage Documentation.*
|
|
80
|
+
- [APIs](../../../../api/api.md) - *A complete collection list of available APIs of ***JSU***.*
|
|
81
|
+
- [Custom](../../../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# JSU - ERROR API - Constructors.UnknownPropertyError()
|
|
2
|
+
|
|
3
|
+
## Table Of Contents
|
|
4
|
+
|
|
5
|
+
- [JSU - ERROR API - Constructors.UnknownPropertyError()](#jsu---error-api---constructorsunknownpropertyerror)
|
|
6
|
+
- [Table Of Contents](#table-of-contents)
|
|
7
|
+
- [What it does?](#what-it-does)
|
|
8
|
+
- [Parameter](#parameter)
|
|
9
|
+
- [Properties](#properties)
|
|
10
|
+
- [Example Usage](#example-usage)
|
|
11
|
+
- [Navigate To](#navigate-to)
|
|
12
|
+
|
|
13
|
+
## What it does?
|
|
14
|
+
|
|
15
|
+
- It raises a report on your project's runtime about a property that is not existing on a certain object.
|
|
16
|
+
|
|
17
|
+
## Parameter
|
|
18
|
+
|
|
19
|
+
- `meta` - The meta data object of this error.
|
|
20
|
+
- `meta.Message` - The message of this error. ( **_Required_** )
|
|
21
|
+
- `meta.Context` - The meta context object of this error.
|
|
22
|
+
- `meta.Context.Message` - A context message that points the root cause of error.
|
|
23
|
+
- `meta.Context.Emitter` - The source id of an object that is responsible of raising this error.
|
|
24
|
+
- `meta.Args` - A meta argument object of this error to check the reported arguments.
|
|
25
|
+
- `meta.Args.Id` - The reported argument id that cause this error.
|
|
26
|
+
- `meta.Args.PropertyId` - The unknown property that is trying to be accessed.
|
|
27
|
+
- `Guide` - A guide for fixing this error.
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
- `Message` - The message of this error.
|
|
32
|
+
- `Context` - The context object of this error.
|
|
33
|
+
- `Args` - The arguments object of this error.
|
|
34
|
+
- `Guide` - A provided guide for fixing this error.
|
|
35
|
+
- `TimeStamp` - A record of date & time of when this error has occurred.
|
|
36
|
+
|
|
37
|
+
## Example Usage
|
|
38
|
+
|
|
39
|
+
```js
|
|
40
|
+
function GetPropertyOf(obj, prop) {
|
|
41
|
+
if (typeof obj !== "object" || Array.isArray(obj) || obj instanceof Map || obj instanceof Set)
|
|
42
|
+
throw new ERROR.Constructors.ArgumentError({...});
|
|
43
|
+
|
|
44
|
+
if (typeof prop !== "string")
|
|
45
|
+
throw new ERROR.Constructors.ArgumentError({...});
|
|
46
|
+
|
|
47
|
+
if (!Object.hasOwn(obj, prop))
|
|
48
|
+
throw new ERROR.Constructors.UnknownPropertyError({
|
|
49
|
+
Message: `Unknown property '${prop}' of 'obj'!`,
|
|
50
|
+
Context: {
|
|
51
|
+
Message: `GetPropertyOf(@obj.${prop}: UNKNOWN_PROPERTY)`,
|
|
52
|
+
Emitter: "GetPropertyOf"
|
|
53
|
+
},
|
|
54
|
+
Args: {
|
|
55
|
+
Id: "obj",
|
|
56
|
+
PropertyId: prop
|
|
57
|
+
},
|
|
58
|
+
Guide: "Ensure to provide only a existing property id of obj!"
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return obj[prop];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
GetPropertyOf({ pi: 3.14, n: 0 }, "p"); // Uncaught UnknownPropertyError: ...
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Navigate To
|
|
68
|
+
|
|
69
|
+
- [Error](../../error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
70
|
+
- [Constructors](../error.constructor.md) - *A collection of customized error class constructors.*
|
|
71
|
+
- [ArgumentError()](./argumentError.md) - *A custom version of Javascript's **TypeError** for invalid arguments types.*
|
|
72
|
+
- [IndexOutOfBoundsError()](./indexOutOfBounds.md) - *A custom version of Javascript's **RangeError** for index that exceeded the maximum index-bound of an object.*
|
|
73
|
+
- [InvalidPropertyError()](./invalidPropertyError.md) - *A custom error class for objects with invalid property.*
|
|
74
|
+
- [MissingParameterError()](./missingParameterError.md) - *A custom error class for parameters that does not provided a data.*
|
|
75
|
+
- [MissingPropertyError()](./missingPropertyError.md) - *A custom error class for incomplete or missing key-pair data of an object.*
|
|
76
|
+
- [NoSuchElementTagError()](./noSuchElementTagError.md) - *A custom error class for unknown or not qualified **HTMLElement**, **MathMLElement**, **SVGElement** tags.*
|
|
77
|
+
- [NotSupportedError()](./notSupportedError.md) - *A custom error class for not supported **objects**, **methods**, and/or **functions**.*
|
|
78
|
+
- [Raise](../../builder/builder.md) - *A collection of pre-defined contents builder and raiser of errors.*
|
|
79
|
+
|
|
80
|
+
- [JSU - README](../../../../../../README.MD) - *JSU Homepage Documentation.*
|
|
81
|
+
- [APIs](../../../../api/api.md) - *A complete collection list of available APIs of ***JSU***.*
|
|
82
|
+
- [Custom](../../../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# JSU - ERROR API
|
|
2
|
+
|
|
3
|
+
## Table Of Contents
|
|
4
|
+
|
|
5
|
+
- [JSU - ERROR API](#jsu---error-api)
|
|
6
|
+
- [Table Of Contents](#table-of-contents)
|
|
7
|
+
- [Usage](#usage)
|
|
8
|
+
- [API Object](#api-object)
|
|
9
|
+
- [Properties](#properties)
|
|
10
|
+
- [Navigate To](#navigate-to)
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
// Loads all available JSU APIs from your project's runtime.
|
|
16
|
+
import "@carlsebastian/jsu";
|
|
17
|
+
|
|
18
|
+
// Only loads ERROR API of JSU from your project's runtime.
|
|
19
|
+
import "@carlsebastian/jsu/error";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## API Object
|
|
23
|
+
|
|
24
|
+
- `ERROR` | `globalThis.ERROR` | `window.ERROR` | `JSU.ERROR`
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
- [Constructors](./constructor/error.constructor.md) - *A collection of customized error class constructors.*
|
|
29
|
+
- [Raise](./builder/builder.md) - *A collection of pre-defined contents builder and raiser of errors.*
|
|
30
|
+
|
|
31
|
+
## Navigate To
|
|
32
|
+
|
|
33
|
+
- [APIs](../../api/api.md) - *A complete collection list of available APIs of **JSU**.*
|
|
34
|
+
- [Custom](../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
35
|
+
|
|
36
|
+
- [JSU - README](../../../../README.MD) - *JSU Homepage Documentation.*
|
|
@@ -35,9 +35,11 @@ console.log(chars[Custom.Clamp(charPos, 0, chars.length - 1)]); // It would alwa
|
|
|
35
35
|
|
|
36
36
|
## Navigate To
|
|
37
37
|
|
|
38
|
-
- [Custom](../custom.md) -
|
|
39
|
-
- [ConstructorOrTypeOf()](./constructorOrTypeOf.md) - Retrieves the
|
|
40
|
-
- [Generator()](./generator/generator.md) - A customized generator constructor for generating randomized
|
|
41
|
-
- [NameOf()](./nameOf.md) - Retrieves the
|
|
42
|
-
|
|
43
|
-
- [JSU - README](../../../../README.MD) - JSU
|
|
38
|
+
- [Custom](../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
39
|
+
- [ConstructorOrTypeOf()](./constructorOrTypeOf.md) - *Retrieves the **constructor** or **type** of the given argument.*
|
|
40
|
+
- [Generator()](./generator/generator.md) - *A customized generator constructor for generating randomized **tokens**, **characters**, and **integer**.*
|
|
41
|
+
- [NameOf()](./nameOf.md) - *Retrieves the **name** property of the given object.*
|
|
42
|
+
|
|
43
|
+
- [JSU - README](../../../../README.MD) - *JSU Homepage Documentation.*
|
|
44
|
+
- [APIs](../../api/api.md) - *A complete collection of available APIs of **JSU**.*
|
|
45
|
+
- [ERROR](../error/error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
@@ -29,9 +29,11 @@ console.log(CTs); // #: [Object, Array, String, Number, Map, Set]
|
|
|
29
29
|
|
|
30
30
|
## Navigate To
|
|
31
31
|
|
|
32
|
-
- [Custom](../custom.md) -
|
|
33
|
-
- [Clamp()](./clamp.md) - Mutates the given numerical value within the given
|
|
34
|
-
- [Generator()](./generator/generator.md) - A customized generator constructor for generating randomized
|
|
35
|
-
- [NameOf()](./nameOf.md) - Retrieves the
|
|
36
|
-
|
|
37
|
-
- [JSU - README](../../../../README.MD) - JSU
|
|
32
|
+
- [Custom](../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
33
|
+
- [Clamp()](./clamp.md) - Mutates the given numerical value within the given **minimum** and **maximum** range.
|
|
34
|
+
- [Generator()](./generator/generator.md) - A customized generator constructor for generating randomized **tokens**, **characters**, and **integer**.
|
|
35
|
+
- [NameOf()](./nameOf.md) - Retrieves the **name** property of the given object.
|
|
36
|
+
|
|
37
|
+
- [JSU - README](../../../../README.MD) - *JSU Homepage Documentation.*
|
|
38
|
+
- [APIs](../../api/api.md) - *A complete collection of available APIs of **JSU**.*
|
|
39
|
+
- [ERROR](../error/error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
@@ -49,9 +49,11 @@ const RInt = Generate.RandomInteger();
|
|
|
49
49
|
|
|
50
50
|
## Navigate To
|
|
51
51
|
|
|
52
|
-
- [Custom](../../custom.md) -
|
|
53
|
-
- [Clamp()](../clamp.md) - Mutates the given numerical value within the given
|
|
54
|
-
- [ConstructorOrTypeOf()](../constructorOrTypeOf.md) - Retrieves the
|
|
55
|
-
- [NameOf()](../nameOf.md) - Retrieves the
|
|
56
|
-
|
|
57
|
-
- [JSU - README](../../../../../README.MD) - JSU
|
|
52
|
+
- [Custom](../../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
53
|
+
- [Clamp()](../clamp.md) - *Mutates the given numerical value within the given **minimum** and **maximum** range.*
|
|
54
|
+
- [ConstructorOrTypeOf()](../constructorOrTypeOf.md) - *Retrieves the **constructor** or **type** of the given argument.*
|
|
55
|
+
- [NameOf()](../nameOf.md) - *Retrieves the **name** property of the given object.*
|
|
56
|
+
|
|
57
|
+
- [JSU - README](../../../../../README.MD) - *JSU Homepage Documentation.*
|
|
58
|
+
- [APIs](../../../api/api.md) - *A complete collection of available APIs of **JSU**.*
|
|
59
|
+
- [ERROR](../../error/error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
@@ -22,11 +22,14 @@ const VToken = Generate.NewToken(); // Generated token with symbols, numbers, an
|
|
|
22
22
|
|
|
23
23
|
## Navigate To
|
|
24
24
|
|
|
25
|
-
- [Custom](../../../custom.md) -
|
|
26
|
-
- [Clamp()](../../clamp.md) - Mutates the given numerical value within the given
|
|
27
|
-
- [ConstructorOrTypeOf()](../../constructorOrTypeOf.md) - Retrieves the
|
|
28
|
-
- [
|
|
29
|
-
|
|
30
|
-
- [
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
- [Custom](../../../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
26
|
+
- [Clamp()](../../clamp.md) - *Mutates the given numerical value within the given **minimum** and **maximum** range.*
|
|
27
|
+
- [ConstructorOrTypeOf()](../../constructorOrTypeOf.md) - *Retrieves the **constructor** or **type** of the given argument.*
|
|
28
|
+
- [NameOf()](../../nameOf.md) - *Retrieves the **name** property of the given object.*
|
|
29
|
+
- [Generator()](../generator.md) - *A customized generator constructor for generating randomized **tokens**, **characters**, and **integer**.*
|
|
30
|
+
- [RandomCharacters()](./generator.randomCharacters.md) - *Generates a sequence of randomized characters of **A-Z** and/or **a-z**.*
|
|
31
|
+
- [RandomInteger()](./generator.randomInteger.md) - *Generates a randomized integer value from the given **minimum** and **maximum** range.*
|
|
32
|
+
|
|
33
|
+
- [JSU - README](../../../../../../README.MD) - *JSU Homepage Documentation.*
|
|
34
|
+
- [APIs](../../../../api/api.md) - *A complete collection of available APIs of **JSU**.*
|
|
35
|
+
- [ERROR](../../../error/error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
@@ -22,11 +22,14 @@ const VChars = Generate.RandomCharacters(); // Generates random sequence of char
|
|
|
22
22
|
|
|
23
23
|
## Navigate To
|
|
24
24
|
|
|
25
|
-
- [Custom](../../../custom.md) -
|
|
26
|
-
- [Clamp()](../../clamp.md) - Mutates the given numerical value within the given
|
|
27
|
-
- [ConstructorOrTypeOf()](../../constructorOrTypeOf.md) - Retrieves the
|
|
28
|
-
- [
|
|
29
|
-
|
|
30
|
-
- [
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
- [Custom](../../../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
26
|
+
- [Clamp()](../../clamp.md) - *Mutates the given numerical value within the given **minimum** and **maximum** range.*
|
|
27
|
+
- [ConstructorOrTypeOf()](../../constructorOrTypeOf.md) - *Retrieves the **constructor** or **type** of the given argument.*
|
|
28
|
+
- [NameOf()](../../nameOf.md) - *Retrieves the **name** property of the given object.*
|
|
29
|
+
- [Generator()](../generator.md) - *A customized generator constructor for generating randomized **tokens**, **characters**, and **integer**.*
|
|
30
|
+
- [NewToken()](./generator.newToken.md) - *Generates a randomized sequence of characters of **A-Z**, **a-z**, **0-9** and **symbols**.*
|
|
31
|
+
- [RandomInteger()](./generator.randomInteger.md) - *Generates a randomized integer value from the given **minimum** and **maximum** range.*
|
|
32
|
+
|
|
33
|
+
- [JSU - README](../../../../../../README.MD) - *JSU Homepage Documentation.*
|
|
34
|
+
- [APIs](../../../../api/api.md) - *A complete collection of available APIs of **JSU**.*
|
|
35
|
+
- [ERROR](../../../error/error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
@@ -28,11 +28,14 @@ console.log(Generate.RandomInteger(0, 10)); // Logs the generated random integer
|
|
|
28
28
|
|
|
29
29
|
## Navigate To
|
|
30
30
|
|
|
31
|
-
- [Custom](../../../custom.md) -
|
|
32
|
-
- [Clamp()](../../clamp.md) - Mutates the given numerical value within the given
|
|
33
|
-
- [ConstructorOrTypeOf()](../../constructorOrTypeOf.md) - Retrieves the
|
|
34
|
-
- [
|
|
35
|
-
|
|
36
|
-
- [
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
- [Custom](../../../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
32
|
+
- [Clamp()](../../clamp.md) - *Mutates the given numerical value within the given **minimum** and **maximum** range.*
|
|
33
|
+
- [ConstructorOrTypeOf()](../../constructorOrTypeOf.md) - *Retrieves the **constructor** or **type** of the given argument.*
|
|
34
|
+
- [NameOf()](../../nameOf.md) - *Retrieves the **name** property of the given object.*
|
|
35
|
+
- [Generator()](../generator.md) - *A customized generator constructor for generating randomized **tokens**, **characters**, and **integer**.*
|
|
36
|
+
- [NewToken()](./generator.newToken.md) - *Generates a randomized sequence of characters of **A-Z**, **a-z**, **0-9** and **symbols**.*
|
|
37
|
+
- [RandomCharacters()](./generator.randomCharacters.md) - *Generates a sequence of randomized characters of **A-Z** and/or **a-z**.*
|
|
38
|
+
|
|
39
|
+
- [JSU - README](../../../../../../README.MD) - *JSU Homepage Documentation.*
|
|
40
|
+
- [APIs](../../../../api/api.md) - *A complete collection of available APIs of **JSU**.*
|
|
41
|
+
- [ERROR](../../../error/error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
|
@@ -29,9 +29,11 @@ for (const O of Os) {
|
|
|
29
29
|
|
|
30
30
|
## Navigate To
|
|
31
31
|
|
|
32
|
-
- [Custom](../custom.md) -
|
|
33
|
-
- [Clamp()](./clamp.md) - Mutates the given numerical value within the given
|
|
34
|
-
- [ConstructorOrTypeOf()](./constructorOrTypeOf.md) - Retrieves the
|
|
35
|
-
- [Generator()](./generator/generator.md) - A customized generator constructor for generating randomized
|
|
36
|
-
|
|
37
|
-
- [JSU - README](../../../../README.MD) - JSU
|
|
32
|
+
- [Custom](../custom.md) - *An API that provides a collection of customized and/or enhanced utilities or objects.*
|
|
33
|
+
- [Clamp()](./clamp.md) - Mutates the given numerical value within the given **minimum** and **maximum** range.
|
|
34
|
+
- [ConstructorOrTypeOf()](./constructorOrTypeOf.md) - Retrieves the **constructor** or **`type`** of the given argument.
|
|
35
|
+
- [Generator()](./generator/generator.md) - A customized generator constructor for generating randomized **tokens**, **characters**, and **integer**.
|
|
36
|
+
|
|
37
|
+
- [JSU - README](../../../../README.MD) - *JSU Homepage Documentation.*
|
|
38
|
+
- [APIs](../../api/api.md) - *A complete collection list of available APIs of **JSU**.*
|
|
39
|
+
- [ERROR](../error/error.md) - *An API that provides a collection of customized and/or enhanced error classes.*
|
package/src/types/api/api.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ interface DomAPI {
|
|
|
112
112
|
|
|
113
113
|
interface ErrorAPI {
|
|
114
114
|
Constructors: ErrorConstructorAPI;
|
|
115
|
-
|
|
115
|
+
Raise: ErrorRaiseAPI;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
type GuardsAPI = GuardsDataTypesAPI & GuardsFormatAPI;
|
|
@@ -136,12 +136,30 @@ interface StorageAPI {
|
|
|
136
136
|
SESSION: SessionStorageAPI;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
interface
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
139
|
+
interface VariablesAPI {
|
|
140
|
+
/**
|
|
141
|
+
* A collection of `HTMLElement` tags name.
|
|
142
|
+
*
|
|
143
|
+
* ***Source***: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements
|
|
144
|
+
*/
|
|
145
|
+
HTMLElementTags: Map<keyof HTMLElementTags, { Generate(): HTMLElement; }>;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* A collection of `SVGElement` tags name.
|
|
149
|
+
*
|
|
150
|
+
* ***Source***: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element
|
|
151
|
+
*/
|
|
152
|
+
SVGElementTags: Map<keyof SVGElementTags, { Generate(): SVGElement; }>;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A collection of `MathMLElement` tags name.
|
|
156
|
+
*
|
|
157
|
+
* ***Source***: https://developer.mozilla.org/en-US/docs/Web/MathML/Reference/Element
|
|
158
|
+
*/
|
|
159
|
+
MathElementTags: Map<keyof MathElementTags, { Generate(): MathMLElement; }>;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* A collection of available XML namespace of elements.
|
|
163
|
+
*/
|
|
164
|
+
XMLNameSpace: ["http://www.w3.org/1998/Math/MathML", "http://www.w3.org/1999/xhtml", "http://www.w3.org/2000/svg"];
|
|
147
165
|
}
|