--- /dev/null
+import { bench, group, run } from 'mitata'
+
+const sampleObj = {
+ name: 'Sid',
+ age: 29,
+ engineer: true,
+ expertise: ['html', 'css', 'react'],
+ address: {
+ city: 'New york',
+ state: 'NY'
+ }
+}
+
+group('JSON stringify', () => {
+ bench('JSON.stringify', () => {
+ JSON.stringify(sampleObj)
+ })
+})
+
+await run({
+ units: true
+})
"preinstall": "npx --yes only-allow pnpm",
"prepare": "node prepare.mjs",
"benchmark:busy-wait": "node busy-wait.mjs",
- "benchmark:empty-array": "node empty-array.mjs",
"benchmark:deep-clone-object": "node deep-clone-object.mjs",
"benchmark:deep-merge-object": "node deep-merge-object.mjs",
+ "benchmark:json-stringify": "node json-stringify.mjs",
+ "benchmark:empty-array": "node empty-array.mjs",
"benchmark:shallow-clone-object": "node shallow-clone-object.mjs",
"benchmark:is-empty-object": "node is-empty-object.mjs",
"benchmark:is-undefined": "node is-undefined.mjs",