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

esformatter-remove-object-spaces

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esformatter-remove-object-spaces - npm Package Compare versions

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)) {

3

package.json
{
"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"
}
}
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