UNPKG

plist2

Version:

Converts between .tmLanguage(.plist), .json, .cson and .yaml formats

20 lines (17 loc) 457 B
/* eslint-disable */ /* dester builds: json2yaml.ts */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var lib = require('../lib'); var yaml = require('yaml'); /* filename: json2yaml.ts timestamp: 2024-12-13T15:18:09.403Z */ var json2yaml = (source, indent = 2) => lib.changeYamlIndentOnString(yaml.stringify(lib.jsonParse(source), { indent: indent === +indent ? indent : 2 }), indent); exports["default"] = json2yaml;