initial working version
This commit is contained in:
3
dist/index.d.ts
vendored
Normal file
3
dist/index.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/// <reference types="js-yaml" />
|
||||
export declare let yamlStringToObject: (yamlStringArg: any, optionsArg?: jsyaml.LoadOptions) => Promise<any>;
|
||||
export declare let objectToYamlString: (objectArg: any, optionsArg?: jsyaml.DumpOptions) => Promise<string>;
|
18
dist/index.js
vendored
Normal file
18
dist/index.js
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const plugins = require("./smartyaml.plugins");
|
||||
exports.yamlStringToObject = (yamlStringArg, optionsArg = {}) => __awaiter(this, void 0, void 0, function* () {
|
||||
return plugins.jsYaml.safeLoad(yamlStringArg);
|
||||
});
|
||||
exports.objectToYamlString = (objectArg, optionsArg = {}) => __awaiter(this, void 0, void 0, function* () {
|
||||
return plugins.jsYaml.safeDump(objectArg);
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsK0NBQThDO0FBRW5DLFFBQUEsa0JBQWtCLEdBQUcsQ0FBTyxhQUFhLEVBQUUsYUFBeUMsRUFBRTtJQUMvRixNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsYUFBYSxDQUFDLENBQUE7QUFDL0MsQ0FBQyxDQUFBLENBQUE7QUFFVSxRQUFBLGtCQUFrQixHQUFHLENBQU8sU0FBUyxFQUFFLGFBQXdDLEVBQUU7SUFDMUYsTUFBTSxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLFNBQVMsQ0FBQyxDQUFBO0FBQzNDLENBQUMsQ0FBQSxDQUFBIn0=
|
3
dist/smartyaml.plugins.d.ts
vendored
Normal file
3
dist/smartyaml.plugins.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import 'typings-global';
|
||||
import * as jsYaml from 'js-yaml';
|
||||
export { jsYaml };
|
6
dist/smartyaml.plugins.js
vendored
Normal file
6
dist/smartyaml.plugins.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("typings-global");
|
||||
const jsYaml = require("js-yaml");
|
||||
exports.jsYaml = jsYaml;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR5YW1sLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHlhbWwucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QixrQ0FBaUM7QUFHL0Isd0JBQU0ifQ==
|
Reference in New Issue
Block a user