Comparing version 2.0.0 to 2.1.0
@@ -5,4 +5,2 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. | ||
var asn1 = require('asn1') | ||
var Protocol = require('../protocol') | ||
@@ -12,4 +10,2 @@ | ||
var BerWriter = asn1.BerWriter | ||
var TYPES = { | ||
@@ -43,5 +39,14 @@ and: Protocol.FILTER_AND, | ||
function isBerWriter (ber) { | ||
return Boolean( | ||
ber && | ||
typeof (ber) === 'object' && | ||
typeof (ber.startSequence) === 'function' && | ||
typeof (ber.endSequence) === 'function' | ||
) | ||
} | ||
function mixin (target) { | ||
target.prototype.toBer = function toBer (ber) { | ||
if (!ber || !(ber instanceof BerWriter)) { throw new TypeError('ber (BerWriter) required') } | ||
if (isBerWriter(ber) === false) { throw new TypeError('ber (BerWriter) required') } | ||
@@ -48,0 +53,0 @@ ber.startSequence(TYPES[this.type]) |
@@ -6,3 +6,3 @@ { | ||
"description": "LDAP client and server APIs", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"license": "MIT", | ||
@@ -9,0 +9,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
226572
6919