MCPcopy Create free account
hub / github.com/OptimalBits/node_acl / fixKeys

Function fixKeys

lib/mongodb-backend.js:234–246  ·  view source on GitHub ↗
(doc)

Source from the content-addressed store, hash-verified

232}
233
234function fixKeys(doc) {
235 if (doc) {
236 var ret = {};
237 for (var key in doc) {
238 if (doc.hasOwnProperty(key)) {
239 ret[decodeText(key)] = doc[key];
240 }
241 }
242 return ret;
243 } else {
244 return doc;
245 }
246}
247
248function fixAllKeys(docs) {
249 if (docs && docs.length) {

Callers 2

mongodb-backend.jsFile · 0.85
fixAllKeysFunction · 0.85

Calls 1

decodeTextFunction · 0.85

Tested by

no test coverage detected