Socket
Socket
Sign inDemoInstall

coffee-formatter

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee-formatter - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

lib/formatter.js

@@ -11,3 +11,3 @@ (function() {

TWO_SPACE_OPERATORS = ['?=', '=', '+=', '-=', '==', '<=', '>=', '>', '<', '+', '-', '*', '/'];
TWO_SPACE_OPERATORS = ['?=', '=', '+=', '-=', '==', '<=', '>=', '!', '>', '<', '+', '-', '*', '/', '%'];

@@ -14,0 +14,0 @@ ONE_SPACE_OPERATORS = [':', '?', ')', '}', ','];

{
"name": "coffee-formatter",
"version": "0.1.1",
"version": "0.1.2",
"description": "A CoffeeScript formatter",

@@ -5,0 +5,0 @@ "main": "lib/formatter.js",

@@ -32,3 +32,3 @@ (function() {

describe('#formatTwoSpaceOperator()', function() {
return it('should make it so that there is only one space before and after a binary operator', function() {
it('should make it so that there is only one space before and after a binary operator', function() {
var formattedLine, originalLine;

@@ -39,2 +39,14 @@ originalLine = 'k = 1+1- 2>=3<= 4>5 <6';

});
it('should make it so that there is only one space before and after a modulo (compound) assignment operator', function() {
var formattedLine, originalLine;
originalLine = 'k %%= 1234';
formattedLine = formatter.formatTwoSpaceOperator(originalLine);
return assert.strictEqual('k %%= 1234', formattedLine);
});
return it('should make it so that there is only one space before and after a negation (compound) assignment operator', function() {
var formattedLine, originalLine;
originalLine = 'k != true';
formattedLine = formatter.formatTwoSpaceOperator(originalLine);
return assert.strictEqual('k != true', formattedLine);
});
});

@@ -41,0 +53,0 @@

Sorry, the diff of this file is not supported yet

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