senselogic-gson 0.1.9 → 0.1.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 +10 -0
- package/building.js +1 -1
- package/index.js +0 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,6 +106,16 @@ Command strings are also enclosed by `‴` characters, but start with a `‼` ch
|
|
|
106
106
|
* `‴‼%id‴` generates an MD5-based TUID.
|
|
107
107
|
* `‴‼@path/to/file.gson‴` includes the contents of another GSON file.
|
|
108
108
|
|
|
109
|
+
## Use Cases
|
|
110
|
+
|
|
111
|
+
GSON is designed to extend JSON in scenarios where additional flexibility and expressiveness are beneficial.
|
|
112
|
+
|
|
113
|
+
It is particularly well suited for configuration files where readability matters, especially when working with multiline text.
|
|
114
|
+
|
|
115
|
+
It also helps organize large configurations or datasets by allowing them to be split into multiple files and included where needed.
|
|
116
|
+
|
|
117
|
+
Additionally, GSON supports generating consistent identifiers such as UUIDs and TUIDs directly within the data.
|
|
118
|
+
|
|
109
119
|
## Limitations
|
|
110
120
|
|
|
111
121
|
When used as literal text:
|
package/building.js
CHANGED
|
@@ -43,7 +43,7 @@ function getMultilineString(
|
|
|
43
43
|
indentationText
|
|
44
44
|
)
|
|
45
45
|
{
|
|
46
|
-
let lineArray = value.replaceAll( "\r", "" ).split( "\n" );
|
|
46
|
+
let lineArray = value.replaceAll( "\r\n", "\n" ).split( "\n" );
|
|
47
47
|
let lineCount = lineArray.length;
|
|
48
48
|
let multilineString = indentationText + "‴";
|
|
49
49
|
|
package/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// -- IMPORTS
|
|
2
2
|
|
|
3
3
|
import { buildGsonText } from "./building.js";
|
|
4
|
-
import { getDumpText } from "./dumping.js";
|
|
5
4
|
import { haveSameValue } from "./equivalence.js";
|
|
6
5
|
import { fetchFileText, getFetchedJsonText, fetchGsonFileText, fetchGsonFileValue } from "./fetching.js";
|
|
7
6
|
import { readFileText, getReadJsonText, readGsonFileText, readGsonFileValue } from "./reading.js";
|
|
@@ -14,7 +13,6 @@ export {
|
|
|
14
13
|
fetchFileText,
|
|
15
14
|
fetchGsonFileText,
|
|
16
15
|
fetchGsonFileValue,
|
|
17
|
-
getDumpText,
|
|
18
16
|
getFetchedJsonText,
|
|
19
17
|
buildGsonText,
|
|
20
18
|
getReadJsonText,
|