sed -i 's/^var /const /'

This commit is contained in:
Daniel Cousens 2018-06-25 16:25:12 +10:00
parent 93b1ae4303
commit 91b8823aa8
37 changed files with 197 additions and 197 deletions

View file

@ -1,6 +1,6 @@
var typeforce = require('typeforce')
const typeforce = require('typeforce')
var UINT31_MAX = Math.pow(2, 31) - 1
const UINT31_MAX = Math.pow(2, 31) - 1
function UInt31 (value) {
return typeforce.UInt32(value) && value <= UINT31_MAX
}
@ -10,16 +10,16 @@ function BIP32Path (value) {
}
BIP32Path.toJSON = function () { return 'BIP32 derivation path' }
var SATOSHI_MAX = 21 * 1e14
const SATOSHI_MAX = 21 * 1e14
function Satoshi (value) {
return typeforce.UInt53(value) && value <= SATOSHI_MAX
}
// external dependent types
var ECPoint = typeforce.quacksLike('Point')
const ECPoint = typeforce.quacksLike('Point')
// exposed, external API
var Network = typeforce.compile({
const Network = typeforce.compile({
messagePrefix: typeforce.oneOf(typeforce.Buffer, typeforce.String),
bip32: {
public: typeforce.UInt32,
@ -31,7 +31,7 @@ var Network = typeforce.compile({
})
// extend typeforce types with ours
var types = {
const types = {
BIP32Path: BIP32Path,
Buffer256bit: typeforce.BufferN(32),
ECPoint: ECPoint,