From 99058b93e47ebbda214e8c69e176cf1b257369e4 Mon Sep 17 00:00:00 2001 From: ebrahimiaval Date: Sat, 13 Jul 2019 12:11:46 +0430 Subject: [PATCH 1/2] change type of value argument of set() and ignore webstorem local files --- .gitignore | 1 + als.js | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index efb4937..fcace0a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules coverage tmp +.idea diff --git a/als.js b/als.js index 556943d..7d43bfb 100644 --- a/als.js +++ b/als.js @@ -136,10 +136,10 @@ exports.disableLinkedTop = () => { /** * Set the key/value for this score - * @param {String} key The key of value - * @param {String} value The value - * @param {Boolean} linkedTop The value linked to top - * @returns {Boolean} if success, will return true, otherwise false + * @param key {string} key The key of value + * @param value {*} value The value + * @param linkedTop {boolean} linkedTop The value linked to top + * @returns {boolean} if success, will return true, otherwise false */ exports.set = function setValue(key, value, linkedTop) { /* istanbul ignore if */ @@ -164,9 +164,11 @@ exports.set = function setValue(key, value, linkedTop) { return true; }; + /** * Get the value by key - * @param {String} key The key of value + * @param key {String} key The key of value + * @returns {*} value of 'key' */ exports.get = function getValue(key) { const data = map.get(getCurrentId()); From f0c32f9202ada6cb0c51dc5298c733a9baa6795b Mon Sep 17 00:00:00 2001 From: ebrahimiaval Date: Sat, 13 Jul 2019 12:24:30 +0430 Subject: [PATCH 2/2] fix "Invalid number of arguments, expected 3" webstorm warning --- als.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/als.js b/als.js index 7d43bfb..2bde705 100644 --- a/als.js +++ b/als.js @@ -138,7 +138,7 @@ exports.disableLinkedTop = () => { * Set the key/value for this score * @param key {string} key The key of value * @param value {*} value The value - * @param linkedTop {boolean} linkedTop The value linked to top + * param linkedTop {boolean} linkedTop The value linked to top * @returns {boolean} if success, will return true, otherwise false */ exports.set = function setValue(key, value, linkedTop) {