New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-jscs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-jscs - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

11

acorn-to-esprima.js

@@ -5,2 +5,4 @@ var traverse = require("babel-core").traverse;

var source = "";
exports.toToken = function (token) {

@@ -49,6 +51,6 @@ var type = token.type;

token.type = "Numeric";
token.value = String(token.value);
token.value = source.slice(token.range[0], token.range[1]);
} else if (type === tt.string) {
token.type = "String";
token.value = JSON.stringify(token.value);
token.value = source.slice(token.range[0], token.range[1]);
} else if (type === tt.regexp) {

@@ -60,3 +62,3 @@ token.type = "RegularExpression";

};
token.value = String(token.value.value);
token.value = source.slice(token.range[0], token.range[1]);
}

@@ -72,5 +74,6 @@

exports.toTokens = function (tokens) {
exports.toTokens = function (tokens, code) {
// transform tokens to type "Template"
convertTemplateType(tokens);
source = code;

@@ -77,0 +80,0 @@ return tokens.map(exports.toToken);

@@ -99,3 +99,3 @@ var acornToEsprima = require("./acorn-to-esprima");

ranges: true,
strictMode: mode === 'loose' ? false : true
strictMode: !mode || mode === "strict"
};

@@ -127,3 +127,3 @@

// convert tokens
ast.tokens = acornToEsprima.toTokens(tokens);
ast.tokens = acornToEsprima.toTokens(tokens, code);

@@ -130,0 +130,0 @@ // add comments

{
"name": "babel-jscs",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -46,3 +46,3 @@ # babel-jscs [![Build Status][travis-image]][travis-url]

"esprima": "./node_modules/babel-jscs", // local
"verbose": "true", // prints out rule names
"verbose": true, // prints out rule names
"preset" : "airbnb"

@@ -49,0 +49,0 @@ }

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