@ygracs/xobj-lib-js 0.2.5-b → 0.2.7-b
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/CHANGELOG.md +1 -0
- package/LICENSE +1 -1
- package/index.d.ts +76 -53
- package/index.js +8 -1
- package/lib/xObj-defs.d.ts +118 -166
- package/lib/xObj-defs.js +5 -39
- package/lib/xObj-errors.d.ts +41 -0
- package/lib/xObj-errors.js +71 -0
- package/lib/xObj-lib.d.ts +316 -301
- package/lib/xObj-lib.js +82 -96
- package/package.json +3 -2
package/lib/xObj-lib.d.ts
CHANGED
|
@@ -1,301 +1,316 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A result of a value check ops.
|
|
3
|
-
*/
|
|
4
|
-
export type RVAL_reason = {
|
|
5
|
-
/**
|
|
6
|
-
* - message ID
|
|
7
|
-
*/
|
|
8
|
-
code: string;
|
|
9
|
-
/**
|
|
10
|
-
* - message text
|
|
11
|
-
*/
|
|
12
|
-
msg: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* A result of a value check ops.
|
|
16
|
-
*/
|
|
17
|
-
export type VCOR_evalkname = {
|
|
18
|
-
/**
|
|
19
|
-
* - ops flag
|
|
20
|
-
*/
|
|
21
|
-
isSucceed: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* - result value or reson if failed
|
|
24
|
-
*/
|
|
25
|
-
value:
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* A result of an
|
|
29
|
-
*/
|
|
30
|
-
export type
|
|
31
|
-
/**
|
|
32
|
-
* -
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* -
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
*
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
*
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
*
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
*
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
*
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
*
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
*
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
*
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
*
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
*
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
*
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
*
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
*
|
|
224
|
-
* @throws {TypeError} if
|
|
225
|
-
*/
|
|
226
|
-
export function
|
|
227
|
-
/**
|
|
228
|
-
*
|
|
229
|
-
* @
|
|
230
|
-
* @throws {TypeError} if
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
*
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
*
|
|
243
|
-
* @throws {TypeError} if
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
*
|
|
249
|
-
* @
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
*
|
|
255
|
-
* @
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
*
|
|
262
|
-
* @throws {TypeError} if
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
*
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
*
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
*
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
*
|
|
294
|
-
* @throws {TypeError} if
|
|
295
|
-
*/
|
|
296
|
-
export function
|
|
297
|
-
/**
|
|
298
|
-
*
|
|
299
|
-
* @
|
|
300
|
-
*/
|
|
301
|
-
export function
|
|
1
|
+
/**
|
|
2
|
+
* A result of a value check ops.
|
|
3
|
+
*/
|
|
4
|
+
export type RVAL_reason = {
|
|
5
|
+
/**
|
|
6
|
+
* - message ID
|
|
7
|
+
*/
|
|
8
|
+
code: string;
|
|
9
|
+
/**
|
|
10
|
+
* - message text
|
|
11
|
+
*/
|
|
12
|
+
msg: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A result of a value check ops.
|
|
16
|
+
*/
|
|
17
|
+
export type VCOR_evalkname = {
|
|
18
|
+
/**
|
|
19
|
+
* - ops flag
|
|
20
|
+
*/
|
|
21
|
+
isSucceed: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* - result value or reson if failed
|
|
24
|
+
*/
|
|
25
|
+
value: string | RVAL_reason;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A result of an element name pattern evaluation ops.
|
|
29
|
+
*/
|
|
30
|
+
export type XObjENameDescr = {
|
|
31
|
+
/**
|
|
32
|
+
* - ops flag
|
|
33
|
+
*/
|
|
34
|
+
isERR: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* - element name
|
|
37
|
+
*/
|
|
38
|
+
name: null | number | string;
|
|
39
|
+
/**
|
|
40
|
+
* - some conditions applied to an element
|
|
41
|
+
*/
|
|
42
|
+
conditions: object | null;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A result of an xObj modification ops
|
|
46
|
+
*/
|
|
47
|
+
export type RVAL_emodif = {
|
|
48
|
+
/**
|
|
49
|
+
* - flag that indicates whether an ops is succeed or not
|
|
50
|
+
*/
|
|
51
|
+
isSucceed: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* - some element as a result
|
|
54
|
+
*/
|
|
55
|
+
item: object | object[] | null;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* An options for an element insertion ops
|
|
59
|
+
*/
|
|
60
|
+
export type OPT_inselops_L = {
|
|
61
|
+
force?: boolean;
|
|
62
|
+
ripOldies?: boolean;
|
|
63
|
+
acceptIfList?: boolean;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* An options for an element insertion ops
|
|
67
|
+
*/
|
|
68
|
+
export type OPT_inselops_S = {
|
|
69
|
+
force?: boolean;
|
|
70
|
+
ripOldies?: boolean;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Extracts a parameter 'AS IS' from a given object.
|
|
75
|
+
* @throws {TypeError} if first param is not an object
|
|
76
|
+
* @throws {TypeError} if third param is not a string
|
|
77
|
+
*/
|
|
78
|
+
export function readXObjParamRaw(obj: object, key?: string): any;
|
|
79
|
+
/**
|
|
80
|
+
* Extracts a parameter from a given object and returns it as a string.
|
|
81
|
+
* @throws {TypeError} if first param is not an object
|
|
82
|
+
*/
|
|
83
|
+
export function readXObjParam(obj: object, key?: string): string;
|
|
84
|
+
/**
|
|
85
|
+
* Extracts a parameter from a given object and returns it as a boolean.
|
|
86
|
+
* @throws {TypeError} if first param is not an object
|
|
87
|
+
*/
|
|
88
|
+
export function readXObjParamAsBool(obj: object, defValue?: boolean, key?: string): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Extracts a parameter from a given object and returns it as a number.
|
|
91
|
+
* @throws {TypeError} if first param is not an object
|
|
92
|
+
*/
|
|
93
|
+
export function readXObjParamAsNum(obj: object, defValue?: number, key?: string): number;
|
|
94
|
+
/**
|
|
95
|
+
* Extracts a parameter from a given object and returns it as a string.
|
|
96
|
+
* @throws {TypeError} if first param is not an object
|
|
97
|
+
* @todo [since `v0.2.1`] deprecate use of `opt` as `string`
|
|
98
|
+
*/
|
|
99
|
+
export function readXObjParamEx(obj: object, opt?: object, key?: string): string;
|
|
100
|
+
/**
|
|
101
|
+
* Extracts a parameter from a given object and returns it as 'index' value.
|
|
102
|
+
* @throws {TypeError} if first param is not an object
|
|
103
|
+
*/
|
|
104
|
+
export function readXObjParamAsIndex(obj: object, key?: string): number;
|
|
105
|
+
/**
|
|
106
|
+
* Writes a parameter 'AS IS' into a given object.
|
|
107
|
+
* @throws {TypeError} if first param is not an object
|
|
108
|
+
* @throws {TypeError} if third param is not a string
|
|
109
|
+
*/
|
|
110
|
+
export function writeXObjParamRaw(obj: object, value: any, key?: string): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Tries to convert a given value to a string and writes it as a parameter
|
|
113
|
+
* into a given object.
|
|
114
|
+
* @throws {TypeError} if first param is not an object
|
|
115
|
+
*/
|
|
116
|
+
export function writeXObjParam(obj: object, value: any, key?: string): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Tries to convert a given value to a boolean and writes it as a parameter
|
|
119
|
+
* into a given object.
|
|
120
|
+
* @throws {TypeError} if first param is not an object
|
|
121
|
+
*/
|
|
122
|
+
export function writeXObjParamAsBool(obj: object, value: any, defValue?: boolean, key?: string): boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Tries to convert a given value to a number and writes it as a parameter
|
|
125
|
+
* into a given object.
|
|
126
|
+
* @throws {TypeError} if first param is not an object
|
|
127
|
+
*/
|
|
128
|
+
export function writeXObjParamAsNum(obj: object, value: any, defValue?: number, key?: string): boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Tries to convert a given value into an 'index' value and writes it
|
|
131
|
+
* as a parameter into a given object.
|
|
132
|
+
* @throws {TypeError} if first param is not an object
|
|
133
|
+
*/
|
|
134
|
+
export function writeXObjParamAsIndex(obj: object, value: any, key?: string): boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Tries to convert a given value to a string and writes it
|
|
137
|
+
* as a parameter into a given object.
|
|
138
|
+
* @throws {TypeError} if first param is not an object
|
|
139
|
+
* @todo [since `v0.2.1`] deprecate use of `opt` as `string`
|
|
140
|
+
*/
|
|
141
|
+
export function writeXObjParamEx(obj: object, value: any, opt?: object, key?: string): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Extracts an attribute 'AS IS' from a given object.
|
|
144
|
+
* @throws {TypeError} if first param is not an object
|
|
145
|
+
* @throws {TypeError} if third param is not a string
|
|
146
|
+
*/
|
|
147
|
+
export function readXObjAttrRaw(obj: object, attr?: string, key?: string): any;
|
|
148
|
+
/**
|
|
149
|
+
* Extracts an attribute from a given object and returns it as a string.
|
|
150
|
+
* @throws {TypeError} if first param is not an object
|
|
151
|
+
*/
|
|
152
|
+
export function readXObjAttr(obj: object, attr: string, key?: string): string;
|
|
153
|
+
/**
|
|
154
|
+
* Extracts an attribute from a given object and returns it as a boolean.
|
|
155
|
+
* @throws {TypeError} if first param is not an object
|
|
156
|
+
*/
|
|
157
|
+
export function readXObjAttrAsBool(obj: object, attr: string, defValue?: boolean, key?: string): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Extracts an attribute from a given object and returns it as a number.
|
|
160
|
+
* @returns {number}
|
|
161
|
+
* @throws {TypeError} if first param is not an object
|
|
162
|
+
*/
|
|
163
|
+
export function readXObjAttrAsNum(obj: object, attr: string, defValue?: number, key?: string): number;
|
|
164
|
+
/**
|
|
165
|
+
* Extracts an attribute from a given object and returns it as a string.
|
|
166
|
+
* @throws {TypeError} if first param is not an object
|
|
167
|
+
* @todo [since `v0.2.1`] deprecate use of `opt` as `string`
|
|
168
|
+
*/
|
|
169
|
+
export function readXObjAttrEx(obj: object, attr: string, opt?: object, key?: string): string;
|
|
170
|
+
/**
|
|
171
|
+
* Extracts an attribute from a given object and returns it as 'index' value.
|
|
172
|
+
* @throws {TypeError} if first param is not an object
|
|
173
|
+
*/
|
|
174
|
+
export function readXObjAttrAsIndex(obj: object, attr: string, key?: string): number;
|
|
175
|
+
/**
|
|
176
|
+
* Writes a parameter into a given object.
|
|
177
|
+
* @throws {TypeError} if first param is not an object
|
|
178
|
+
* @throws {TypeError} if third param is not a string
|
|
179
|
+
*/
|
|
180
|
+
export function writeXObjAttrRaw(obj: object, attr: string, value: any, key?: string): boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Tries to convert a given value to a string and writes it as an attribute
|
|
183
|
+
* into a given object.
|
|
184
|
+
* @throws {TypeError} if first param is not an object
|
|
185
|
+
*/
|
|
186
|
+
export function writeXObjAttr(obj: object, attr: string, value: any, key?: string): boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Tries to convert a given value to a boolean and writes it as an attribute
|
|
189
|
+
* into a given object.
|
|
190
|
+
* @throws {TypeError} if first param is not an object
|
|
191
|
+
*/
|
|
192
|
+
export function writeXObjAttrAsBool(obj: object, attr: string, value: any, defValue?: boolean, key?: string): boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Tries to convert a given value to a number and writes it as an attribute
|
|
195
|
+
* into a given object.
|
|
196
|
+
* @throws {TypeError} if first param is not an object
|
|
197
|
+
*/
|
|
198
|
+
export function writeXObjAttrAsNum(obj: object, attr: string, value: any, defValue?: number, key?: string): boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Tries to convert a given value into an 'index' value and writes it
|
|
201
|
+
* as an attribute into a given object.
|
|
202
|
+
* @throws {TypeError} if first param is not an object
|
|
203
|
+
*/
|
|
204
|
+
export function writeXObjAttrAsIndex(obj: object, attr: string, value: any, key?: string): boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Tries to convert a given value to a string and writes it as an attribute
|
|
207
|
+
* into a given object.
|
|
208
|
+
* @throws {TypeError} if first param is not an object
|
|
209
|
+
* @todo [since `v0.2.1`] deprecate use of `opt` as `string`
|
|
210
|
+
*/
|
|
211
|
+
export function writeXObjAttrEx(obj: object, attr: string, value: any, opt?: object, key?: string): boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Extracts an attributes from a given object by its key.
|
|
214
|
+
* @throws {TypeError} if first param is not an object
|
|
215
|
+
*/
|
|
216
|
+
export function getXObjAttributes(obj: object, key?: string): object | null;
|
|
217
|
+
/**
|
|
218
|
+
* Checks whether an attribute is exists.
|
|
219
|
+
* @throws {TypeError} if first param is not an object
|
|
220
|
+
*/
|
|
221
|
+
export function checkXObjAttribute(obj: object, attr?: string, key?: string): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* Deletes an attribute addressed by a given name.
|
|
224
|
+
* @throws {TypeError} if first param is not an object
|
|
225
|
+
*/
|
|
226
|
+
export function deleteXObjAttribute(obj: object, attr?: string, key?: string): boolean;
|
|
227
|
+
/**
|
|
228
|
+
* Renames an attribute addressed by a given name.
|
|
229
|
+
* @since 0.2.0
|
|
230
|
+
* @throws {TypeError} if first param is not an object
|
|
231
|
+
* @throws {TypeError} if second param is not an object
|
|
232
|
+
* @throws {TypeError} if third param is not an object
|
|
233
|
+
*/
|
|
234
|
+
export function renameXObjAttribute(obj: object, attr?: string, value?: string, key?: string): boolean;
|
|
235
|
+
/**
|
|
236
|
+
* Extracts an element from a given object by its key.
|
|
237
|
+
* @throws {TypeError} if first param is not an object
|
|
238
|
+
* @throws {TypeError} if second param is empty string or not a string at all
|
|
239
|
+
*/
|
|
240
|
+
export function getXObjElement(obj: object, name: string): any | null;
|
|
241
|
+
/**
|
|
242
|
+
* Adds an element addressed by its key to a given object.
|
|
243
|
+
* @throws {TypeError} if first param is not an object
|
|
244
|
+
* @throws {TypeError} if second param is empty string or not a string at all
|
|
245
|
+
*/
|
|
246
|
+
export function addXObjElement(obj: object, name: string): RVAL_emodif;
|
|
247
|
+
/**
|
|
248
|
+
* Inserts an element addressed by its key into a given object.
|
|
249
|
+
* @throws {TypeError} if first param is not an object
|
|
250
|
+
* @see insertXObjElementEx
|
|
251
|
+
*/
|
|
252
|
+
export function insertXObjElement(...args: [obj: object, name: string, opt?: OPT_inselops_L]): object | null;
|
|
253
|
+
/**
|
|
254
|
+
* Inserts an element addressed by its key into a given object.
|
|
255
|
+
* @since 0.2.0
|
|
256
|
+
* @throws {TypeError} if first param is not an object
|
|
257
|
+
* @throws {TypeError} if second param is empty string or not a string at all
|
|
258
|
+
*/
|
|
259
|
+
export function insertXObjElementEx(obj: object, name: string, opt?: OPT_inselops_L): RVAL_emodif;
|
|
260
|
+
/**
|
|
261
|
+
* Deletes an element addressed by its key from a given object.
|
|
262
|
+
* @throws {TypeError} if first param is not an object
|
|
263
|
+
* @see deleteXObjElementEx
|
|
264
|
+
*/
|
|
265
|
+
export function deleteXObjElement(...args: [obj: object, name: string]): boolean;
|
|
266
|
+
/**
|
|
267
|
+
* Deletes an element addressed by its key from a given object.
|
|
268
|
+
* @throws {TypeError} if first param is not an object
|
|
269
|
+
* @throws {TypeError} if second param is empty string or not a string at all
|
|
270
|
+
*/
|
|
271
|
+
export function deleteXObjElementEx(obj: object, name: string): RVAL_emodif;
|
|
272
|
+
/**
|
|
273
|
+
* Renames an element addressed by its key.
|
|
274
|
+
* @throws {TypeError} if first param is not an object
|
|
275
|
+
* @throws {TypeError} if second param is not a string
|
|
276
|
+
* @throws {TypeError} if third param is not a string
|
|
277
|
+
*/
|
|
278
|
+
export function renameXObjElement(obj: object, name?: string, value?: string): boolean;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Tries to convert a value into an ID.
|
|
282
|
+
*/
|
|
283
|
+
export function evalXObjEName(value: any): null | number | string;
|
|
284
|
+
/**
|
|
285
|
+
* Inserts a list elements into a given object.
|
|
286
|
+
* @throws {TypeError} if first param is not an object
|
|
287
|
+
* @see insertXObjEListEx
|
|
288
|
+
*/
|
|
289
|
+
export function insertXObjEList(...args: [obj: object, name: string, opt?: OPT_inselops_S]): object | object[] | null;
|
|
290
|
+
/**
|
|
291
|
+
* Inserts a list elements into a given object.
|
|
292
|
+
* @since 0.2.0
|
|
293
|
+
* @throws {TypeError} if first param is not an object
|
|
294
|
+
* @throws {TypeError} if second param is empty string or not a string at all
|
|
295
|
+
*/
|
|
296
|
+
export function insertXObjEListEx(obj: object, name: string, opt?: OPT_inselops_S): RVAL_emodif;
|
|
297
|
+
/**
|
|
298
|
+
* Tries to convert a value into an ID.
|
|
299
|
+
* @inner
|
|
300
|
+
*/
|
|
301
|
+
export function evalKeyName(value: any, opt?: boolean): VCOR_evalkname;
|
|
302
|
+
/**
|
|
303
|
+
* Tries to convert a value into an element name description.
|
|
304
|
+
*/
|
|
305
|
+
export function genXObjENameDescr(value: any): XObjENameDescr;
|
|
306
|
+
/**
|
|
307
|
+
* Inserts an elements into a given object.
|
|
308
|
+
* @throws {TypeError} if first param is not an object
|
|
309
|
+
*/
|
|
310
|
+
export function insertXObjElements(obj: object, ...args: any[]): number;
|
|
311
|
+
/**
|
|
312
|
+
* Inserts a chain of an elements into a given object.
|
|
313
|
+
* @throws {TypeError} if first param is not an object
|
|
314
|
+
*/
|
|
315
|
+
export function insertXObjEChain(obj: object, ...args: any[]): any | null;
|
|
316
|
+
export {}
|