@stryke/json 0.8.0 → 0.8.2

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
@@ -22,7 +22,7 @@ This package is part of Storm Software's **đŸŒŠī¸ Stryke** monorepo. Stryke pac
22
22
 
23
23
  <h3 align="center">đŸ’ģ Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
24
24
 
25
- [![Version](https://img.shields.io/badge/version-0.7.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
+ [![Version](https://img.shields.io/badge/version-0.8.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
26
26
 
27
27
  > [!IMPORTANT] This repository, and the apps, libraries, and tools contained
28
28
  > within, is still in it's initial development phase. As a result, bugs and
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.stringify = exports.invalidKeyChars = void 0;
7
7
  var _isNumber = require("@stryke/type-checks/is-number");
8
8
  var _isUndefined = require("@stryke/type-checks/is-undefined");
9
- const invalidKeyChars = exports.invalidKeyChars = ["@", "/", "#", "$", " ", '"', "'", "`", "{", "}", "[", "]", "(", ")", "<", ">"],
9
+ const invalidKeyChars = exports.invalidKeyChars = ["@", "/", "#", "$", " ", ":", ";", ",", ".", "!", "?", "&", "=", "+", "-", "*", "%", "^", "~", "|", "\\", '"', "'", "`", "{", "}", "[", "]", "(", ")", "<", ">"],
10
10
  stringify = (r, e = 2) => {
11
11
  const n = (0, _isNumber.isNumber)(e) ? " ".repeat(e) : e;
12
12
  switch (r) {
@@ -1,4 +1,4 @@
1
- export declare const invalidKeyChars: readonly ["@", "/", "#", "$", " ", "\"", "'", "`", "{", "}", "[", "]", "(", ")", "<", ">"];
1
+ export declare const invalidKeyChars: readonly ["@", "/", "#", "$", " ", ":", ";", ",", ".", "!", "?", "&", "=", "+", "-", "*", "%", "^", "~", "|", "\\", "\"", "'", "`", "{", "}", "[", "]", "(", ")", "<", ">"];
2
2
  /**
3
3
  * Stringify a value to a JSON-like string.
4
4
  *
@@ -1 +1 @@
1
- import{isNumber as c}from"@stryke/type-checks/is-number";import{isUndefined as o}from"@stryke/type-checks/is-undefined";export const invalidKeyChars=["@","/","#","$"," ",'"',"'","`","{","}","[","]","(",")","<",">"],stringify=(r,e=2)=>{const n=c(e)?" ".repeat(e):e;switch(r){case null:return"null";case void 0:return'"undefined"';case!0:return"true";case!1:return"false";case Number.POSITIVE_INFINITY:return"infinity";case Number.NEGATIVE_INFINITY:return"-infinity"}if(Array.isArray(r))return`[${n}${r.map(s=>stringify(s,n)).join(`,${n}`)}${n}]`;if(r instanceof Uint8Array)return r.toString();switch(typeof r){case"number":return`${r}`;case"string":return JSON.stringify(r);case"object":{const s=Object.keys(r).filter(t=>!o(r[t]));return`{${n}${s.map(t=>`${invalidKeyChars.some(i=>t.includes(i))?`"${t}"`:t}: ${n}${stringify(r[t],n)}`).join(`,${n}`)}${n}}`}default:return"null"}};
1
+ import{isNumber as c}from"@stryke/type-checks/is-number";import{isUndefined as o}from"@stryke/type-checks/is-undefined";export const invalidKeyChars=["@","/","#","$"," ",":",";",",",".","!","?","&","=","+","-","*","%","^","~","|","\\",'"',"'","`","{","}","[","]","(",")","<",">"],stringify=(r,e=2)=>{const n=c(e)?" ".repeat(e):e;switch(r){case null:return"null";case void 0:return'"undefined"';case!0:return"true";case!1:return"false";case Number.POSITIVE_INFINITY:return"infinity";case Number.NEGATIVE_INFINITY:return"-infinity"}if(Array.isArray(r))return`[${n}${r.map(s=>stringify(s,n)).join(`,${n}`)}${n}]`;if(r instanceof Uint8Array)return r.toString();switch(typeof r){case"number":return`${r}`;case"string":return JSON.stringify(r);case"object":{const s=Object.keys(r).filter(t=>!o(r[t]));return`{${n}${s.map(t=>`${invalidKeyChars.some(i=>t.includes(i))?`"${t}"`:t}: ${n}${stringify(r[t],n)}`).join(`,${n}`)}${n}}`}default:return"null"}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/json",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "description": "A package containing JSON parsing/stringify utilities used by Storm Software.",
6
6
  "repository": {