From e70e4337021c65a30fe718ccdd4e2b99d16e1205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Wed, 16 Oct 2019 00:00:00 +0000 Subject: [PATCH] alphanumeric.js: improve namiug a bit --- rootfs_overlay/lkmc/nodejs/alphanumeric.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs_overlay/lkmc/nodejs/alphanumeric.js b/rootfs_overlay/lkmc/nodejs/alphanumeric.js index a628e85..0f6fc20 100755 --- a/rootfs_overlay/lkmc/nodejs/alphanumeric.js +++ b/rootfs_overlay/lkmc/nodejs/alphanumeric.js @@ -30,14 +30,14 @@ const is_almost_alphanumeric = function (str) { for (let c of str) { if ( !char_is_alphanumeric(c) && - !is_almost_alphanumeric.almost_chars.has(c) + !is_almost_alphanumeric.chars.has(c) ) { return false; } } return true; }; -is_almost_alphanumeric.almost_chars = new Set(['-', '_']); +is_almost_alphanumeric.chars = new Set(['-', '_']); assert( is_alphanumeric('aB0')); assert(!is_alphanumeric('aB0_-'));