From 1c6bd4aa95d54944f5452ff1a6c336abefcd786a Mon Sep 17 00:00:00 2001 From: doublefint Date: Tue, 18 Apr 2017 20:44:15 +0300 Subject: [PATCH] Update index.js handle numbers --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 8c37325..754db41 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ var escape = module.exports = function escape(string, ignore) { var pattern; if (string === null || string === undefined) return; - + string += '' ignore = (ignore || '').replace(/[^&"<>\']/g, ''); pattern = '([&"<>\'])'.replace(new RegExp('[' + ignore + ']', 'g'), ''); @@ -19,4 +19,4 @@ var map = escape.map = { , "'": ''' , '"': '"' , '&': '&' -} \ No newline at end of file +}