Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cson2yaml

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cson2yaml - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

19

lib/cson2yaml.js

@@ -51,3 +51,3 @@ // Generated by CoffeeScript 1.7.1

object: function(obj, extratab) {
var handler, indentThis, key, leadIndent, output, val;
var alias, handler, indentThis, key, leadIndent, output, val;
if (extratab == null) {

@@ -67,3 +67,9 @@ extratab = 0;

}
_results.push("" + key + ": " + (handler(val)));
if (type(val) === 'object' && val._alias) {
alias = "&" + val._alias;
delete val._alias;
_results.push("" + key + ": " + alias + (handler(val)));
} else {
_results.push("" + key + ": " + (handler(val)));
}
}

@@ -80,11 +86,10 @@ return _results;

string: function(str) {
var safestr;
if (str.match(/^(true|false|undefined|null)$/)) {
return "\"" + str + "\"";
}
safestr = JSON.stringify(str).replace(/^"|"$/g, "");
if (safestr.match(/\\n/)) {
return "|\n" + indents(indentLevel + 1) + safestr.replace(/(\\n|\\r)/g, "\n" + indents(indentLevel + 1));
if (str.match(/\n|\r/)) {
return "|\n" + indents(indentLevel + 1) + str.replace(/(\n|\r)/g, "\n" + indents(indentLevel + 1));
} else {
return str;
}
return safestr;
},

@@ -91,0 +96,0 @@ undefined: function() {

@@ -5,3 +5,3 @@ {

"author": "Awnist <hi@awnist.com> (http://awnist.com)",
"version": "0.0.4",
"version": "0.0.5",
"main": "./lib/cson2yaml",

@@ -8,0 +8,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc