pacc 4.42.0 → 5.1.0
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 +5 -0
- package/package.json +1 -1
- package/src/attributes.mjs +1 -1
- package/src/expression.mjs +2 -0
- package/types/attributes.d.mts +1 -1
- package/types/expression.d.mts +4 -0
package/README.md
CHANGED
|
@@ -70,6 +70,7 @@ const result = getAttribute({ a: [0,{ b: 4 }]}, "a[1].b");
|
|
|
70
70
|
* [integer\_attribute](#integer_attribute-1)
|
|
71
71
|
* [integer\_attribute](#integer_attribute-2)
|
|
72
72
|
* [integer\_attribute\_writable](#integer_attribute_writable)
|
|
73
|
+
* [integer\_attribute\_writable](#integer_attribute_writable-1)
|
|
73
74
|
* [object\_attribute](#object_attribute)
|
|
74
75
|
* [url\_attribute](#url_attribute)
|
|
75
76
|
* [url\_attribute\_writable](#url_attribute_writable)
|
|
@@ -338,6 +339,10 @@ Type: [AttributeDefinition](#attributedefinition)
|
|
|
338
339
|
|
|
339
340
|
Type: [AttributeDefinition](#attributedefinition)
|
|
340
341
|
|
|
342
|
+
## integer\_attribute\_writable
|
|
343
|
+
|
|
344
|
+
Type: [AttributeDefinition](#attributedefinition)
|
|
345
|
+
|
|
341
346
|
## object\_attribute
|
|
342
347
|
|
|
343
348
|
Type: [AttributeDefinition](#attributedefinition)
|
package/package.json
CHANGED
package/src/attributes.mjs
CHANGED
|
@@ -80,7 +80,7 @@ export function prepareValue(value, attribute) {
|
|
|
80
80
|
return value;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export function
|
|
83
|
+
export function mandatoryAttributesPresent(object, attributes) {
|
|
84
84
|
for (const [path, attribute] of attributeIterator(
|
|
85
85
|
attributes,
|
|
86
86
|
(name, attribute) => attribute.mandatory
|
package/src/expression.mjs
CHANGED
|
@@ -314,6 +314,8 @@ export const globals = {
|
|
|
314
314
|
},
|
|
315
315
|
min: (a, b) => (a < b ? a : b),
|
|
316
316
|
max: (a, b) => (a > b ? a : b),
|
|
317
|
+
uppercase: (a) => a.toUpperCase(),
|
|
318
|
+
lowercase: (a) => a.toLowerCase(),
|
|
317
319
|
substring: (s, a, b) => s.substring(a, b),
|
|
318
320
|
length: s => s.length
|
|
319
321
|
};
|
package/types/attributes.d.mts
CHANGED
|
@@ -15,5 +15,5 @@ export function prepareAttributesDefinitions(newDefinitions: any, presentDefinit
|
|
|
15
15
|
export function attributeIterator(definition: any, filter: Function, path?: string[]): Iterable<[string[], object]>;
|
|
16
16
|
export function writableAttributeIterator(definition: any): Generator<[string[], any], void, any>;
|
|
17
17
|
export function prepareValue(value: any, attribute: any): any;
|
|
18
|
-
export function
|
|
18
|
+
export function mandatoryAttributesPresent(object: any, attributes: any): boolean;
|
|
19
19
|
export function filterWritable(name: any, attribute: any): any;
|
package/types/expression.d.mts
CHANGED
|
@@ -4,6 +4,8 @@ export function parse(input: any, context?: {
|
|
|
4
4
|
in: (a: any, b: any) => boolean;
|
|
5
5
|
min: (a: any, b: any) => any;
|
|
6
6
|
max: (a: any, b: any) => any;
|
|
7
|
+
uppercase: (a: any) => any;
|
|
8
|
+
lowercase: (a: any) => any;
|
|
7
9
|
substring: (s: any, a: any, b: any) => any;
|
|
8
10
|
length: (s: any) => any;
|
|
9
11
|
};
|
|
@@ -13,6 +15,8 @@ export namespace globals {
|
|
|
13
15
|
export { _in as in };
|
|
14
16
|
export function min(a: any, b: any): any;
|
|
15
17
|
export function max(a: any, b: any): any;
|
|
18
|
+
export function uppercase(a: any): any;
|
|
19
|
+
export function lowercase(a: any): any;
|
|
16
20
|
export function substring(s: any, a: any, b: any): any;
|
|
17
21
|
export function length(s: any): any;
|
|
18
22
|
}
|