Skip to content

Commit bb0ad6e

Browse files
committed
Updated package name and refactored functions
1 parent a97305a commit bb0ad6e

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "slow-json-stringify",
2+
"name": "@darkgl/slow-json-stringify",
33
"version": "2.1.0",
44
"description": "The fastest JSON stringifier",
55
"main": "dist/sjs.js",

src/_makeChunks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Chunk, QueueItem } from './types.js';
22

3-
const _replaceString = ( type: string ) => type.includes('string') ? '"__par__"' : "__par__";
3+
const _replaceString = (type: string) => (type.includes('string') ? '"__par__"' : '__par__');
44

55
// 3 possibilities after arbitrary property:
66
// - ", => non-last string property

src/_prepare.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import type { PreparedSchema, SjsSchema } from './types.js';
77
* @param {object} schema - user provided schema
88
*/
99
const _prepare = (schema: SjsSchema) => {
10-
const preparedString = JSON.stringify(schema, (_, value) => value.isSJS ? `${value.type}__sjs` : value);
10+
const preparedString = JSON.stringify(schema, (_, value) =>
11+
value.isSJS ? `${value.type}__sjs` : value,
12+
);
1113

1214
const preparedSchema = JSON.parse(preparedString) as PreparedSchema;
1315

0 commit comments

Comments
 (0)