From 1ab7a5eb0ba45198ddce3fc0739b4cb42a3999ad Mon Sep 17 00:00:00 2001 From: Majid Q Date: Thu, 7 Sep 2023 11:44:04 +1000 Subject: [PATCH] Update json.js --- src/json.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/json.js b/src/json.js index 532d9e3..365b4d5 100644 --- a/src/json.js +++ b/src/json.js @@ -177,7 +177,7 @@ const json = (val, opts = {}) => { /** * Flags the field to be spreaded in resulting JSON. */ -const spread = (uid = '') => SPREAD_KEY_NAME + uid + Math.random(); +const spread = (uid = '', rnd = Math.random) => SPREAD_KEY_NAME + uid + rnd(); module.exports.json = json; module.exports.spread = spread;