From 25ac0d70f48b171a5282552bbd256731e385194e Mon Sep 17 00:00:00 2001 From: RTLcoil Date: Mon, 28 Dec 2020 17:54:43 +0200 Subject: [PATCH] Update docstring for normalize_expression --- lib/utils/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/utils/index.js b/lib/utils/index.js index 9f996c16..77bf41ee 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -122,9 +122,11 @@ function textStyle(layer) { } /** - * Normalize an offset value - * @param {String} expression a decimal value which may have a 'p' or '%' postfix. E.g. '35%', '0.4p' - * @return {Object|String} a normalized String of the input value if possible otherwise the value itself + * Normalize an expression string, replace "nice names" with their coded values and spaces with "_" + * e.g. `width > 0` => `w_lt_0` + * + * @param {String} expression An expression to be normalized + * @return {Object|String} A normalized String of the input value if possible otherwise the value itself */ function normalize_expression(expression) { if (!isString(expression) || expression.length === 0 || expression.match(/^!.+!$/)) {