Don't be so strict about dn methods requiring a DN instance

This commit is contained in:
Mark Cavage 2011-10-20 11:22:31 -07:00
parent 95bc10934a
commit b8799d6a1e
2 changed files with 4 additions and 4 deletions

View File

@ -213,7 +213,7 @@ DN.prototype.toString = function() {
DN.prototype.childOf = function(dn) {
if (!(dn instanceof DN))
if (typeof(dn) !== 'object')
dn = parse(dn);
if (this.rdns.length <= dn.rdns.length)
@ -236,7 +236,7 @@ DN.prototype.childOf = function(dn) {
DN.prototype.parentOf = function(dn) {
if (!(dn instanceof DN))
if (typeof(dn) !== 'object')
dn = parse(dn);
if (this.rdns.length >= dn.rdns.length)
@ -259,7 +259,7 @@ DN.prototype.parentOf = function(dn) {
DN.prototype.equals = function(dn) {
if (!(dn instanceof DN))
if (typeof(dn) !== 'object')
dn = parse(dn);
if (this.rdns.length !== dn.rdns.length)

View File

@ -3,7 +3,7 @@
"name": "ldapjs",
"homepage": "http://ldapjs.org",
"description": "LDAP client and server APIs",
"version": "0.2.5",
"version": "0.2.6",
"repository": {
"type": "git",
"url": "git://github.com/mcavage/node-ldapjs.git"