ovyerus / redite Goto Github PK
View Code? Open in Web Editor NEWA Redis wrapper for Node.JS, using ES6 Proxies & native Redis data types.
License: MIT License
A Redis wrapper for Node.JS, using ES6 Proxies & native Redis data types.
License: MIT License
Add support for setting Set
s, probably mainly at first level?
This was brought up while working on Clara the other day, where I was made aware that evalling the Redite instance attached to the bot whould reveal the URI for the Redis connection (if supplied). This is due to the bot running util.inspect
on all output from the command.
It is possible to override the result of inspecting an object in Node, and we should do so in order to not expose potentially sensitive data.
I'm pretty happy with where Redite is in terms of functionality and API design however there's a bit of housekeeping I wish to do.
I had another idea but I forgot, maybe I'll remember.
Currently, Redite uses pure promises, which does increase its compatibility with older version of Node (4.x.x without a polyfill such as Bluebird or when), but does make its code flow quite messy to go through. I could try to redo some of the code with promises, however I feel that moving to the new async/await syntax would be a lot easier, as well as making future maintainability much easier, and if a user does need to use/support an earlier version of Node, they can always use something like Babel to transpile it.
Recently, the method used to set a deeply nested key in a list or hash, broke.
(redite.js, lines 243-249)
stack.slice(2, -1).forEach(key => {
if (!ref.hasOwnProperty(key)) ref[key] = /^[0-9]+$/.test(key) ? [] : {};
ref = ref[key];
});
ref[stack.slice(-1)[0]] = value; // Set the final nested value.
This ends up with TypeError: Cannot read property 'bar' of null
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.