1 | const {normalise} = require('./normalise')
|
2 | const {validate} = require('./validate')
|
3 | const {schema} = require('./schema')
|
4 |
|
5 | module.exports.normalise = normalise
|
6 | module.exports.validate = validate
|
7 | module.exports.schema = schema
|
8 |
|
9 | module.exports.Manifest =
|
10 | class Manifest {
|
11 | constructor (manifest = []) {
|
12 | this.manifest = manifest
|
13 | if (!Array.isArray(this.manifest)) {
|
14 | throw new TypeError('Manifest must be an Array')
|
15 | }
|
16 | }
|
17 |
|
18 | validate () {
|
19 | return validate(this.manifest)
|
20 | }
|
21 |
|
22 | normalise () {
|
23 | return normalise(this.manifest)
|
24 | }
|
25 | }
|