mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-08-04 00:41:56 +02:00
Code cleanup: Use EnigError's vs standard Error. WIP...
This commit is contained in:
parent
8f9f4227c1
commit
0c23339a2d
10 changed files with 88 additions and 77 deletions
|
@ -1,7 +1,9 @@
|
|||
/* jslint node: true */
|
||||
'use strict';
|
||||
|
||||
let _ = require('lodash');
|
||||
const { Errors } = require('./enig_error.js');
|
||||
|
||||
const _ = require('lodash');
|
||||
|
||||
// FNV-1a based on work here: https://github.com/wiedi/node-fnv
|
||||
module.exports = class FNV1a {
|
||||
|
@ -23,7 +25,7 @@ module.exports = class FNV1a {
|
|||
}
|
||||
|
||||
if(!Buffer.isBuffer(data)) {
|
||||
throw new Error('data must be String or Buffer!');
|
||||
throw Errors.Invalid('data must be String or Buffer!');
|
||||
}
|
||||
|
||||
for(let b of data) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue