pacc 3.1.0 → 3.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 CHANGED
@@ -35,8 +35,12 @@ const result = getAttribute({ a: [0,{ b: 4 }]}, "a[1].b");
35
35
  * [Parameters](#parameters-1)
36
36
  * [getAttributeAndOperator](#getattributeandoperator)
37
37
  * [Parameters](#parameters-2)
38
- * [tokens](#tokens)
38
+ * [Token](#token)
39
+ * [Properties](#properties-1)
40
+ * [createToken](#createtoken)
39
41
  * [Parameters](#parameters-3)
42
+ * [tokens](#tokens)
43
+ * [Parameters](#parameters-4)
40
44
 
41
45
  ## AttributeDefinition
42
46
 
@@ -88,7 +92,23 @@ The name may be a property path like 'a.b.c <='.
88
92
  * `object` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**&#x20;
89
93
  * `expression` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
90
94
 
91
- Returns **\[any, [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)]** value associated with the given property name
95
+ Returns **\[any, [Token](#token)]** value associated with the given property name
96
+
97
+ ## Token
98
+
99
+ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
100
+
101
+ ### Properties
102
+
103
+ * `str` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
104
+
105
+ ## createToken
106
+
107
+ ### Parameters
108
+
109
+ * `str` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
110
+
111
+ Returns **[Token](#token)**&#x20;
92
112
 
93
113
  ## tokens
94
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
package/src/attribute.mjs CHANGED
@@ -13,6 +13,11 @@
13
13
  * @property {string[]|string} [env] environment variable use to provide the value
14
14
  */
15
15
 
16
+ /**
17
+ * @typedef {Object} Token
18
+ * @property {string} str
19
+ */
20
+
16
21
  import {
17
22
  tokens,
18
23
  EQUAL,
package/src/tokens.mjs CHANGED
@@ -231,6 +231,7 @@ export function* tokens(string) {
231
231
  state = "number";
232
232
  break;
233
233
  case "number":
234
+ // @ts-ignore
234
235
  buffer = buffer * 10 + c.charCodeAt(0) - 48;
235
236
  break;
236
237
  case "string":
@@ -56,3 +56,6 @@ export type AttributeDefinition = {
56
56
  */
57
57
  env?: string[] | string;
58
58
  };
59
+ export type Token = {
60
+ str: string;
61
+ };