diff options
author | Fabio Berger <me@fabioberger.com> | 2017-05-25 18:09:50 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-05-25 18:09:50 +0800 |
commit | a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9 (patch) | |
tree | 96e0d1909d64d3b0204edfc3647f996004541a1d /src | |
parent | bcfb1a699a8c4469649af721875d878290198899 (diff) | |
download | dexon-0x-contracts-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.tar.gz dexon-0x-contracts-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.tar.zst dexon-0x-contracts-a5550a0b585dfb80176082d57ca0bf3ca1e4d1f9.zip |
rename v to validator for clarity
Diffstat (limited to 'src')
-rw-r--r-- | src/ts/utils/schema_validator.ts | 12 |
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); } } |