functional-models 2.0.6 → 2.0.10
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 +7 -2
- package/interfaces.d.ts +1 -1
- package/interfaces.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,11 +4,16 @@
|
|
|
4
4
|

|
|
5
5
|
[](https://coveralls.io/github/monolithst/functional-models?branch=master)
|
|
6
6
|
|
|
7
|
-
Love functional javascript but still like composing objects/models? This is the library for you.
|
|
8
|
-
|
|
7
|
+
Love functional javascript/typescript but still like composing objects/models? This is the library for you.
|
|
8
|
+
|
|
9
|
+
This library empowers the creation of pure JavaScript function based models that can be used on a client, a web frontend, and/or a backend all the same time. Use this library to create models that can be reused everywhere.
|
|
10
|
+
|
|
11
|
+
This library is fully supportive of both Typescript and Javascript. In fact, the typescript empowers some really sweet dynamic type checking, and autocomplete! It handles validation as well.
|
|
9
12
|
|
|
10
13
|
## Example Usage
|
|
11
14
|
|
|
15
|
+
|
|
16
|
+
|
|
12
17
|
const {
|
|
13
18
|
field,
|
|
14
19
|
constantValueField,
|
package/interfaces.d.ts
CHANGED
|
@@ -167,4 +167,4 @@ declare type OptionalModelOptions<T extends FunctionalModel, TModel extends Mode
|
|
|
167
167
|
readonly instanceCreatedCallback?: Nullable<Arrayable<(instance: TModelInstance) => void>>;
|
|
168
168
|
readonly [s: string]: any;
|
|
169
169
|
} | undefined;
|
|
170
|
-
export { MaybeFunction, Maybe, MaybePromise, Nullable, Arrayable, MaybeLazy, JsonAble, toObj, ModelInstance, Model, PropertyValidatorComponent, PropertyValidatorComponentSync, PropertyValidatorComponentAsync, PropertyValidator, ModelValidatorComponent, PropertyInstance, PropertyConfig, FunctionalValue, ValueGetter, ModelReference, ModelDefinition, ModelOptions, ModelMethod, OptionalModelOptions, ModelReferencePropertyInstance, PropertyGetters, PropertyValidators, PropertyValidatorComponentTypeAdvanced, ModelInstanceMethod, FunctionalModel, ModelInstanceInputData, ModelMethodGetters, InstanceMethodGetters, ModelReferenceFunctions, ModelErrors, PrimaryKeyType, ModelFactory, ModelFetcher, CreateParams, ValidatorConfiguration, ValuePropertyValidatorComponent, ValueRequired, ValueOptional, ValueOptionalR, ValueRequiredR, PropertyModifier, ValidationErrors, ModelError, IsAsync, ModelInstanceMethodClient, ModelMethodClient, TypedJsonObj, };
|
|
170
|
+
export { MaybeFunction, Maybe, MaybePromise, Nullable, Arrayable, MaybeLazy, JsonAble, toObj, ModelInstance, Model, PropertyValidatorComponent, PropertyValidatorComponentSync, PropertyValidatorComponentAsync, PropertyValidator, ModelValidatorComponent, PropertyInstance, PropertyConfig, FunctionalValue, ValueGetter, ModelReference, ModelDefinition, ModelOptions, ModelMethod, OptionalModelOptions, ModelReferencePropertyInstance, PropertyGetters, PropertyValidators, PropertyValidatorComponentTypeAdvanced, ModelInstanceMethod, FunctionalModel, ModelInstanceInputData, ModelMethodGetters, InstanceMethodGetters, ModelReferenceFunctions, ModelErrors, PrimaryKeyType, ModelFactory, ModelFetcher, CreateParams, ValidatorConfiguration, ValuePropertyValidatorComponent, ValueRequired, ValueOptional, ValueOptionalR, ValueRequiredR, PropertyModifier, ValidationErrors, ModelError, IsAsync, ModelInstanceMethodClient, ModelMethodClient, TypedJsonObj, JsonObj, };
|
package/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":";;AAyeA,kCAAkC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "functional-models",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"description": "A library for creating JavaScript function based models.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@types/proxyquire": "^1.3.28",
|
|
59
59
|
"@types/sinon": "^10.0.6",
|
|
60
60
|
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
61
|
+
"@typescript-eslint/parser": "^5.3.0",
|
|
61
62
|
"babel-eslint": "^10.1.0",
|
|
62
63
|
"chai": "^4.3.0",
|
|
63
64
|
"chai-as-promised": "^7.1.1",
|
|
@@ -73,7 +74,6 @@
|
|
|
73
74
|
"typescript": "^4.4.4"
|
|
74
75
|
},
|
|
75
76
|
"dependencies": {
|
|
76
|
-
"@typescript-eslint/parser": "^5.3.0",
|
|
77
77
|
"async-lock": "^1.3.0",
|
|
78
78
|
"get-random-values": "^1.2.2",
|
|
79
79
|
"lodash": "^4.17.21"
|