From 7130384ad549e0e2998cd745a3977f978b3fa4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionic=C4=83=20Biz=C4=83u?= Date: Fri, 18 Dec 2020 10:18:13 +0200 Subject: [PATCH] Updated docs --- lib/index.js | 6 ++++-- package.json | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/index.js b/lib/index.js index dd18e65..8cd228e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5,13 +5,13 @@ const iterateObject = require("iterate-object") ; -/** +/*! * Returns true, if given key is included in the blacklisted * keys. * @param key key for check, string. */ function isPrototypePolluted(key) { - return ['__proto__', 'prototype', 'constructor'].includes(key); + return module.exports.blacklistedKeys.includes(key); } /** @@ -54,3 +54,5 @@ module.exports = function unflattenObject(flatten, separator) { return result; }; + +module.exports.blacklistedKeys = ["__proto__", "prototype", "constructor"]; diff --git a/package.json b/package.json index 4281a2e..d4f8f6d 100644 --- a/package.json +++ b/package.json @@ -53,4 +53,4 @@ "bloggify.json", "bloggify/" ] -} \ No newline at end of file +}