@har-sdk/core
Version: 
The base package can be used to import specification files (i.e. HAR, OAS and Postman Collection) and detect their type.
15 lines • 468 B
JavaScript
import { BaseLoader } from './BaseLoader';
import { YamlSyntaxErrorDetailsExtractor } from './errors';
import { load, YAMLException } from 'js-yaml';
export class YamlLoader extends BaseLoader {
    constructor() {
        super(new YamlSyntaxErrorDetailsExtractor());
    }
    parse() {
        return load(this.source, { json: true });
    }
    isSupportedError(error) {
        return error instanceof YAMLException;
    }
}
//# sourceMappingURL=YamlLoader.js.map