libp2p-record
Advanced tools
Comparing version 0.7.1 to 0.7.2
@@ -0,1 +1,11 @@ | ||
<a name="0.7.2"></a> | ||
## [0.7.2](https://github.com/libp2p/js-libp2p-record/compare/v0.7.1...v0.7.2) (2020-02-13) | ||
### Bug Fixes | ||
* remove use of assert module ([#18](https://github.com/libp2p/js-libp2p-record/issues/18)) ([57e24a7](https://github.com/libp2p/js-libp2p-record/commit/57e24a7)) | ||
<a name="0.7.1"></a> | ||
@@ -2,0 +12,0 @@ ## [0.7.1](https://github.com/libp2p/js-libp2p-record/compare/v0.7.0...v0.7.1) (2020-01-03) |
{ | ||
"name": "libp2p-record", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "libp2p record implementation", | ||
@@ -55,2 +55,3 @@ "leadMaintainer": "Vasco Santos <vasco.santos@moxy.studio>", | ||
"Alan Shaw <alan.shaw@protocol.ai>", | ||
"Alex Potsides <alex@achingbrain.net>", | ||
"David Dias <daviddias.p@gmail.com>", | ||
@@ -57,0 +58,0 @@ "Friedel Ziegelmayer <dignifiedquire@gmail.com>", |
'use strict' | ||
const protons = require('protons') | ||
const assert = require('assert') | ||
@@ -16,8 +15,8 @@ const pb = protons(require('./record.proto')).Record | ||
constructor (key, value, recvtime) { | ||
if (key) { | ||
assert(Buffer.isBuffer(key), 'key must be a Buffer') | ||
if (key && !Buffer.isBuffer(key)) { | ||
throw new Error('key must be a Buffer') | ||
} | ||
if (value) { | ||
assert(Buffer.isBuffer(value), 'value must be a buffer') | ||
if (value && !Buffer.isBuffer(value)) { | ||
throw new Error('value must be a buffer') | ||
} | ||
@@ -24,0 +23,0 @@ |
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
24380
541