@stoplight/yaml
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "@stoplight/yaml", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Useful functions when working with YAML.", | ||
@@ -28,3 +28,2 @@ "keywords": [ | ||
"@stoplight/types": "3.x.x", | ||
"js-yaml": "3.x.x", | ||
"lodash": "4.x.x", | ||
@@ -31,0 +30,0 @@ "yaml-ast-parser": "0.0.43" |
@@ -1,2 +0,11 @@ | ||
import { DumpOptions } from 'js-yaml'; | ||
export declare const safeStringify: (value: any, options?: DumpOptions | undefined) => string; | ||
import { SchemaDefinition } from 'js-yaml'; | ||
export interface IDumpOptions { | ||
indent?: number; | ||
skipInvalid?: boolean; | ||
flowLevel?: number; | ||
styles?: { | ||
[x: string]: any; | ||
}; | ||
schema?: SchemaDefinition; | ||
} | ||
export declare const safeStringify: (value: any, options?: IDumpOptions | undefined) => string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const js_yaml_1 = require("js-yaml"); | ||
const yaml_ast_parser_1 = require("yaml-ast-parser"); | ||
exports.safeStringify = (value, options) => { | ||
if (!value || typeof value === 'string') | ||
return value; | ||
return js_yaml_1.safeDump(value, options); | ||
return yaml_ast_parser_1.safeDump(value, options); | ||
}; | ||
//# sourceMappingURL=safeStringify.js.map |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24032
3
166
- Removedjs-yaml@3.x.x
- Removedargparse@1.0.10(transitive)
- Removedesprima@4.0.1(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedsprintf-js@1.0.3(transitive)