Socket
Socket
Sign inDemoInstall

ignore

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ignore - npm Package Compare versions

Comparing version 2.2.1 to 2.2.7

25

index.js

@@ -14,9 +14,24 @@ 'use strict';

var exists = node_fs.existsSync ?
function (file) {
return node_fs.existsSync(file);
} :
// if node <= 0.6, there's no fs.existsSync method.
function (file) {
try {
node_fs.statSync(file);
return true;
} catch(e) {
return false;
}
};
// Select the first existing file of the file list
ignore.select = function (files) {
var exists;
var selected;
files.some(function (file) {
if( node_fs.existsSync(file) ){
exists = file;
if( exists(file) ){
selected = file;
return true;

@@ -26,3 +41,3 @@ }

return exists;
return selected;
};

@@ -33,3 +48,3 @@

// - ignore: {Array}
// - twoGlobstars: {boolean=false} enable pattern '`**`' (two consecutive asterisks), default to `false`.
// - twoGlobstars: {boolean=false} enable pattern `'**'` (two consecutive asterisks), default to `false`.
// If false, ignore patterns with two globstars will be omitted

@@ -36,0 +51,0 @@ // - matchCase: {boolean=true} case sensitive.

2

package.json
{
"name": "ignore",
"version": "2.2.1",
"version": "2.2.7",
"description": "Ignore is a manager and filter for .gitignore rules.",

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

@@ -0,2 +1,4 @@

[![NPM version](https://badge.fury.io/js/ignore.png)](http://badge.fury.io/js/ignore)
[![Build Status](https://travis-ci.org/kaelzhang/node-ignore.png?branch=master)](https://travis-ci.org/kaelzhang/node-ignore)
[![Dependency Status](https://gemnasium.com/kaelzhang/node-ignore.png)](https://gemnasium.com/kaelzhang/node-ignore)

@@ -3,0 +5,0 @@ # ignore

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