Merge branch 'master' of git://github.com/morphar/node-ldapjs into morphar-master

This commit is contained in:
Mark Cavage 2013-01-31 01:06:40 +00:00
commit 5157e72f5d
2 changed files with 26 additions and 2 deletions

View File

@ -59,6 +59,30 @@ function SearchEntry(options) {
});
return obj;
});
this.__defineGetter__('raw', function () {
var obj = {
dn: self.dn.toString(),
controls: []
};
self.attributes.forEach(function (a) {
if (a.buffers && a.buffers.length) {
if (a.buffers.length > 1) {
obj[a.type] = a.buffers.slice();
} else {
obj[a.type] = a.buffers[0];
}
} else {
obj[a.type] = [];
}
});
self.controls.forEach(function (element, index, array) {
obj.controls.push(element.json);
});
return obj;
});
this.__defineGetter__('_dn', function () {
return self.objectName;
});

View File

@ -11,7 +11,7 @@
"name": "ldapjs",
"homepage": "http://ldapjs.org",
"description": "LDAP client and server APIs",
"version": "0.5.9",
"version": "0.6.0",
"repository": {
"type": "git",
"url": "git://github.com/mcavage/node-ldapjs.git"
@ -22,7 +22,7 @@
"lib": "./lib"
},
"engines": {
"node": ">=0.6"
"node": ">=0.8"
},
"dependencies": {
"asn1": "0.1.11",