You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

reed

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reed - npm Package Compare versions

Comparing version

to
0.9.6

24

lib/reed.js

@@ -377,3 +377,9 @@ var fs = require("fs"),

client.hget(key, "metadata", function(err, metadata) {
metadata = JSON.parse(metadata);
try {
metadata = JSON.parse(metadata)
}
catch (parseErr) {
//if we can't understand it we don't want it
metadata = {};
}
if (typeof(metadata) !== "undefined" && metadata != null && Object.keys(metadata).length > 0) {

@@ -402,3 +408,9 @@ if (typeof callback !== "undefined")

if (typeof callback !== "undefined") {
var metadata = JSON.parse(hash.metadata);
var metadata = {};
try {
metadata = JSON.parse(hash.metadata);
}
catch (parseErr) {
//no good metadata - ignore
}
callback(null, metadata, hash.post);

@@ -653,3 +665,9 @@ }

if (typeof callback !== "undefined") {
var metadata = JSON.parse(hash.metadata);
var metadata = {};
try {
metadata = JSON.parse(hash.metadata);
}
catch (parseErr) {
//no good metadata - ignore
}
callback(null, metadata, hash.post);

@@ -656,0 +674,0 @@ }

2

package.json

@@ -7,3 +7,3 @@ {

"tags": [ "redis", "blog" ],
"version": "0.9.5",
"version": "0.9.6",
"homepage": "http://www.agnos.is/",

@@ -10,0 +10,0 @@ "repository": {

@@ -130,2 +130,5 @@ reed

`metadata`, and `htmlContent`.
* `all(callback)`: Retrieves all blog posts. The callback receives `error` and
`posts`, which is a list of post objects, each containing `metadata` and
`htmlContent` properties.
* `getMetadata(id, callback)`: Retrieves only the metadata for a blog post. The

@@ -132,0 +135,0 @@ callback receives `error` (if there was an error), and `metadata`, an object