Skip to content

Instantly share code, notes, and snippets.

@jhs
Created December 13, 2013 12:06
Show Gist options
  • Save jhs/7943348 to your computer and use it in GitHub Desktop.
Save jhs/7943348 to your computer and use it in GitHub Desktop.
jhs@air:~$ curl isaacs.ic.ht/registry/_design/app > app.json
jhs@air:~$ node -e 'app = JSON.parse(require("fs").readFileSync("app.json")); console.log(app.updates.package)' > package.js
jhs@air:~$ grep -A 10 'if(newdoc._attachments)' package.js
if(newdoc._attachments) {
var inline = false
for(var k in newdoc._attachments) {
if(newdoc._attachments[k].data) {
doc._attachments[k] = newdoc._attachments[k]
inline = true
}
}
if(inline)
return ok(doc, "updated package metadata & attachments")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment