@wildwinter/toolkit 0.1.0 → 0.2.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/CHANGELOG.md +54 -0
- package/README.md +17 -2
- package/conformance/extensions/defaults.json +69 -0
- package/conformance/extensions/manifest.json +1129 -0
- package/conformance/extensions/merge.json +154 -0
- package/conformance/extensions/values.json +741 -0
- package/dist/chunk-ONEAWPDZ.js +11 -0
- package/dist/chunk-ONEAWPDZ.js.map +1 -0
- package/dist/extensions.cjs +948 -0
- package/dist/extensions.cjs.map +1 -0
- package/dist/extensions.d.cts +324 -0
- package/dist/extensions.d.ts +324 -0
- package/dist/extensions.js +902 -0
- package/dist/extensions.js.map +1 -0
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/extensions.md +192 -0
- package/package.json +29 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import JSON5 from 'json5';
|
|
2
|
+
|
|
3
|
+
// src/source.ts
|
|
4
|
+
function parseSource(text) {
|
|
5
|
+
const body = text.charCodeAt(0) === 65279 ? text.slice(1) : text;
|
|
6
|
+
return JSON5.parse(body);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { parseSource };
|
|
10
|
+
//# sourceMappingURL=chunk-ONEAWPDZ.js.map
|
|
11
|
+
//# sourceMappingURL=chunk-ONEAWPDZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/source.ts"],"names":[],"mappings":";;;AAWO,SAAS,YAAY,IAAA,EAAuB;AACjD,EAAA,MAAM,IAAA,GAAO,KAAK,UAAA,CAAW,CAAC,MAAM,KAAA,GAAS,IAAA,CAAK,KAAA,CAAM,CAAC,CAAA,GAAI,IAAA;AAC7D,EAAA,OAAO,KAAA,CAAM,MAAM,IAAI,CAAA;AACzB","file":"chunk-ONEAWPDZ.js","sourcesContent":["// ---------------------------------------------------------------------------\n// Reading authored source files.\n// ---------------------------------------------------------------------------\n\nimport JSON5 from \"json5\";\n\n/**\n * Parse JSON5 source text. A leading byte-order mark is tolerated, because\n * editors on Windows add one and JSON5 will not accept it. Throws on malformed\n * input.\n */\nexport function parseSource(text: string): unknown {\n const body = text.charCodeAt(0) === 0xfeff ? text.slice(1) : text;\n return JSON5.parse(body);\n}\n"]}
|