UNPKG

insomnia-importers

Version:

Various data importers for Insomnia

26 lines 875 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.convert = exports.description = exports.name = exports.id = void 0; const yaml_1 = __importDefault(require("yaml")); exports.id = 'insomnia-4'; exports.name = 'Insomnia v4'; exports.description = 'Insomnia export format 4'; const convert = rawData => { let data; try { data = yaml_1.default.parse(rawData); } catch (error) { return null; } if (data.__export_format !== 4) { // Bail early if it's not the legacy format return null; } // This is the target export format so nothing needs to change return data.resources; }; exports.convert = convert; //# sourceMappingURL=insomnia-4.js.map