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

editorconfig

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

editorconfig - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

14

editorconfig.js

@@ -83,3 +83,3 @@ var fs = require('fs');

configurations.push([path.dirname(configFilePath), parsedOutput]);
if (parsedOutput.root == "true") break;
if ((parsedOutput[0][1].root || "").toLowerCase() == "true") break;
}

@@ -91,4 +91,6 @@ }

var config = configurations[j][1];
for (var glob in config) {
for (var k in config) {
var glob = config[k][0];
var fullGlob;
if (!glob) continue;
if (glob.indexOf('/') === -1) {

@@ -102,5 +104,5 @@ fullGlob = path.join(pathPrefix, "**/" + glob);

if (fnmatch(filepath, fullGlob)) {
for (var k in config[glob]) {
var value = config[glob][k];
if (knownOptions.indexOf(k) !== -1) {
for (var m in config[k][1]) {
var value = config[k][1][m];
if (knownOptions.indexOf(m) !== -1) {
value = value.toLowerCase();

@@ -111,3 +113,3 @@ }

} catch(e){}
matches[k.toLowerCase()] = value;
matches[m.toLowerCase()] = value;
}

@@ -114,0 +116,0 @@ }

@@ -0,0 +0,0 @@ // Based on minimatch.js by isaacs <https://npmjs.org/package/minimatch>

@@ -16,3 +16,3 @@ // Based on iniparser by shockie <https://npmjs.org/package/iniparser>

section: /^\s*\[(([^#;]|\\#|\\;)+)\]\s*([#;].*)?$/,
param: /^\s*([\w\.\-\_]+)\s*=\s*(.*?)\s*([#;].*)?$/,
param: /^\s*([\w\.\-\_]+)\s*[=:]\s*(.*?)\s*([#;].*)?$/,
comment: /^\s*[#;].*$/

@@ -45,7 +45,8 @@ };

function parse(data){
var value = {};
var sectionBody = {};
var sectionName = null;
var value = [[sectionName, sectionBody]];
var lines = data.split(/\r\n|\r|\n/);
var section = null;
lines.forEach(function(line){
var match;
var match;
if(regex.comment.test(line)){

@@ -55,11 +56,8 @@ return;

match = line.match(regex.param);
if(section){
value[section][match[1]] = match[2];
}else{
value[match[1]] = match[2];
}
sectionBody[match[1]] = match[2];
}else if(regex.section.test(line)){
match = line.match(regex.section);
value[match[1]] = {};
section = match[1];
sectionName = match[1];
sectionBody = {};
value.push([sectionName, sectionBody]);
}

@@ -66,0 +64,0 @@ });

@@ -0,0 +0,0 @@ function Version(version) {

{
"name": "editorconfig",
"version": "0.11.0",
"version": "0.11.1",
"description": "EditorConfig File Locator and Interpreter for Node.js",
"keywords": ["editorconfig", "core"],
"main": "editorconfig.js",
"contributors": [
"Hong Xu (topbug.net)",
"Jed Hunsaker <jed.hunsaker[at]gmail.com>",
"Trey Hunner (http://treyhunner.com)"
],
"directories" : {

@@ -8,0 +13,0 @@ "bin": "./bin",

@@ -0,0 +0,0 @@ # EditorConfig JavaScript Core

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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