1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Support __proto__ and similar as object attribute in hgetall

This commit is contained in:
Ruben Bridgewater
2016-04-13 03:48:33 +02:00
parent a11e0c5ff9
commit 228573b8d7
4 changed files with 25 additions and 37 deletions

8
lib/rawObject.js Normal file
View File

@@ -0,0 +1,8 @@
'use strict';
// Using a predefined object with this prototype is faster than calling `Object.create(null)` directly
// This is needed to make sure `__proto__` and similar reserved words can be used
function RawObject () {}
RawObject.prototype = Object.create(null);
module.exports = RawObject;