From d4c56e5de8d03f03043cfee36b478e134adda651 Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Thu, 24 May 2018 17:03:30 +0200 Subject: [PATCH] feat: improve patch strings format --- modifiers/d.js | 2 +- modifiers/f.js | 2 +- modifiers/i.js | 2 +- modifiers/j.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modifiers/d.js b/modifiers/d.js index 0378bad..7ecec99 100644 --- a/modifiers/d.js +++ b/modifiers/d.js @@ -4,6 +4,6 @@ module.exports = function (value/*, placeholder, argIndex, args*/) { try { return String(Number(value)); } catch (e) { - return "[Non-coercible (to number) value]"; + return ""; } }; diff --git a/modifiers/f.js b/modifiers/f.js index c75049b..d444abf 100644 --- a/modifiers/f.js +++ b/modifiers/f.js @@ -4,6 +4,6 @@ module.exports = function (value/*, placeholder, argIndex, args*/) { try { return String(isNaN(value) ? parseFloat(value) : Number(value)); } catch (e) { - return "[Non-coercible (to float) value]"; + return ""; } }; diff --git a/modifiers/i.js b/modifiers/i.js index 440d2f9..97f1422 100644 --- a/modifiers/i.js +++ b/modifiers/i.js @@ -6,6 +6,6 @@ module.exports = function (value/*, placeholder, argIndex, args*/) { try { return String(isNaN(value) ? parseInt(value, 10) : toInteger(value)); } catch (e) { - return "[Non-coercible (to integer) value]"; + return ""; } }; diff --git a/modifiers/j.js b/modifiers/j.js index e83a79d..0c0e457 100644 --- a/modifiers/j.js +++ b/modifiers/j.js @@ -16,6 +16,6 @@ module.exports = function (value/*, placeholder, argIndex, args*/) { return JSON.stringify(value, null, " "); } catch (e) { if (e.message === CIRCULAR_JSON_ERROR_MESSAGE) return "[Circular JSON]"; - return "[Non-serializable (to JSON) value]"; + return ""; } };