You've already forked node-redis
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:
8
lib/rawObject.js
Normal file
8
lib/rawObject.js
Normal 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;
|
Reference in New Issue
Block a user