Comparing version 2.3.2 to 2.3.3
@@ -74,3 +74,5 @@ 'use strict'; | ||
return _recast2.default.print(ast).code; | ||
return _recast2.default.print(ast, { | ||
lineTerminator: _this.detectLineTerminator(code) | ||
}).code; | ||
}); | ||
@@ -95,2 +97,10 @@ } | ||
} | ||
}, { | ||
key: 'detectLineTerminator', | ||
value: function detectLineTerminator(code) { | ||
var hasCRLF = /\r\n/.test(code); | ||
var hasLF = /[^\r]\n/.test(code); | ||
return hasCRLF && !hasLF ? '\r\n' : '\n'; | ||
} | ||
}]); | ||
@@ -97,0 +107,0 @@ |
{ | ||
"name": "lebab", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "Turn your ES5 code into readable ES6/ES7", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
157467
4160