new DN methods
This commit is contained in:
parent
ccff51804a
commit
e0007f6f6a
40
lib/dn.js
40
lib/dn.js
|
@ -300,6 +300,46 @@ DN.prototype.parent = function() {
|
|||
};
|
||||
|
||||
|
||||
DN.prototype.clone = function() {
|
||||
return new DN(this.rdns);
|
||||
};
|
||||
|
||||
|
||||
DN.prototype.reverse = function() {
|
||||
this.rdns.reverse();
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
DN.prototype.pop = function() {
|
||||
return this.rdns.pop();
|
||||
};
|
||||
|
||||
|
||||
DN.prototype.push = function(rdn) {
|
||||
if (typeof(rdn) !== 'object')
|
||||
throw new TypeError('rdn (RDN) required');
|
||||
|
||||
return this.rdns.push(rdn);
|
||||
};
|
||||
|
||||
|
||||
DN.prototype.shift = function() {
|
||||
return this.rdns.shift();
|
||||
};
|
||||
|
||||
|
||||
DN.prototype.unshift = function(rdn) {
|
||||
if (typeof(rdn) !== 'object')
|
||||
throw new TypeError('rdn (RDN) required');
|
||||
|
||||
return this.rdns.unshift(rdn);
|
||||
};
|
||||
|
||||
|
||||
|
||||
///--- Exports
|
||||
|
||||
module.exports = {
|
||||
|
||||
parse: parse,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "ldapjs",
|
||||
"homepage": "http://ldapjs.org",
|
||||
"description": "LDAP client and server APIs",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mcavage/node-ldapjs.git"
|
||||
|
|
Loading…
Reference in New Issue