Use own assert
Because it weights much less that than the browserify's one.
This commit is contained in:
parent
e6d4e4c029
commit
b8b6294f95
|
@ -7,9 +7,9 @@
|
|||
"use strict";
|
||||
|
||||
require("object.assign").shim();
|
||||
var assert = require("assert");
|
||||
var bufferEqual = require("buffer-equal");
|
||||
var bs58 = require("bs58");
|
||||
var assert = require("./util").assert;
|
||||
var var_int = require("./structs").var_int;
|
||||
var bmcrypto = require("./crypto");
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"use strict";
|
||||
|
||||
require("object.assign").shim();
|
||||
var assert = require("assert");
|
||||
var bufferEqual = require("buffer-equal");
|
||||
var assert = require("./util").assert;
|
||||
var bmcrypto = require("./crypto");
|
||||
|
||||
function isAscii(str) {
|
||||
|
|
7
lib/util.js
Normal file
7
lib/util.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
exports.assert = function(condition, message) {
|
||||
if (!condition) {
|
||||
throw new Error(message || "Assertion failed");
|
||||
}
|
||||
};
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var assert = require("assert");
|
||||
var bufferEqual = require("buffer-equal");
|
||||
var bs58 = require("bs58");
|
||||
var assert = require("./util").assert;
|
||||
var bmcrypto = require("./crypto");
|
||||
|
||||
// Compute the WIF checksum for the given data.
|
||||
|
|
Loading…
Reference in New Issue
Block a user