aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/utils
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-05-25 18:09:50 +0800
committerFabio Berger <me@fabioberger.com>2017-05-25 18:09:50 +0800
commita5550a0b585dfb80176082d57ca0bf3ca1e4d1f9 (patch)
tree96e0d1909d64d3b0204edfc3647f996004541a1d /src/ts/utils
parentbcfb1a699a8c4469649af721875d878290198899 (diff)
downloaddexon-sol-tools-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.tar
dexon-sol-tools-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.tar.gz
dexon-sol-tools-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.tar.bz2
dexon-sol-tools-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.tar.lz
dexon-sol-tools-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.tar.xz
dexon-sol-tools-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.tar.zst
dexon-sol-tools-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.zip
rename v to validator for clarity
Diffstat (limited to 'src/ts/utils')
-rw-r--r--src/ts/utils/schema_validator.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ts/utils/schema_validator.ts b/src/ts/utils/schema_validator.ts
index 1cbffee58..bd2f97d2b 100644
--- a/src/ts/utils/schema_validator.ts
+++ b/src/ts/utils/schema_validator.ts
@@ -1,14 +1,14 @@
-import {Validator as V, ValidatorResult} from 'jsonschema';
+import {Validator, ValidatorResult} from 'jsonschema';
import {ECSignatureSchema, ECSignatureParameter} from '../schemas/ec_signature_schema';
export class SchemaValidator {
- private v: V;
+ private validator: Validator;
constructor() {
- this.v = new V();
- this.v.addSchema(ECSignatureParameter, ECSignatureParameter.id);
- this.v.addSchema(ECSignatureSchema, ECSignatureSchema.id);
+ this.validator = new Validator();
+ this.validator.addSchema(ECSignatureParameter, ECSignatureParameter.id);
+ this.validator.addSchema(ECSignatureSchema, ECSignatureSchema.id);
}
public validate(instance: object, schema: Schema): ValidatorResult {
- return this.v.validate(instance, schema);
+ return this.validator.validate(instance, schema);
}
}