esformatter-remove-object-spaces
Advanced tools
Comparing version 0.0.1 to 0.0.2
19
index.js
@@ -1,7 +0,20 @@ | ||
'use strict'; | ||
var tk = require('rocambole-token'); | ||
var rocambole = require('rocambole'); | ||
exports.tokenBefore = tokenBefore; | ||
module.exports = { | ||
transformAfter: function(ast) { | ||
rocambole.recursive(ast, transform); | ||
} | ||
}; | ||
function transform(node) { | ||
if (node.type != 'ObjectExpression') return; | ||
var token = node.startToken; | ||
if (isOpeningCurlyBracket(token) && shouldRemoveSpaces(token.next)) { | ||
removeSpaces(token.next); | ||
} | ||
} | ||
function tokenBefore(token) { | ||
@@ -8,0 +21,0 @@ if (isOpeningCurlyBracket(token) && shouldRemoveSpaces(token.next)) { |
{ | ||
"name": "esformatter-remove-object-spaces", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Remove spaces between braces of blank object literals", | ||
@@ -32,4 +32,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"rocambole": "^0.6.0", | ||
"rocambole-token": "^1.2.1" | ||
} | ||
} |
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
4194
72
2
+ Addedrocambole@^0.6.0
+ Addedesprima@2.7.3(transitive)
+ Addedrocambole@0.6.0(transitive)