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 3.1.0 to 3.1.1

19

ignore.js

@@ -42,13 +42,8 @@ 'use strict';

if (pattern instanceof IgnoreBase) {
this._rules = this._rules.concat(pattern._rules);
this._added = true;
} else {
if (typeof pattern === 'string') {
pattern = pattern.split(/\r?\n/g);
}
make_array(pattern).forEach(this._addPattern, this);
if (typeof pattern === 'string') {
pattern = pattern.split(/\r?\n/g);
}
make_array(pattern).forEach(this._addPattern, this);
// Some rules have just added to the ignore,

@@ -73,2 +68,8 @@ // making the behavior changed.

value: function _addPattern(pattern) {
if (pattern instanceof IgnoreBase) {
this._rules = this._rules.concat(pattern._rules);
this._added = true;
return;
}
if (this._checkPattern(pattern)) {

@@ -75,0 +76,0 @@ var rule = this._createRule(pattern);

{
"name": "ignore",
"version": "3.1.0",
"version": "3.1.1",
"description": "Ignore is a manager and filter for .gitignore rules.",

@@ -5,0 +5,0 @@ "main": "./ignore.js",

@@ -75,3 +75,3 @@ [![Build Status](https://travis-ci.org/kaelzhang/node-ignore.svg?branch=master)](https://travis-ci.org/kaelzhang/node-ignore)

- pattern `String|Ignore` An ignore pattern string, or the `Ignore` instance(to inherit the rules of another `Ignore` instance)
- pattern `String|Ignore` An ignore pattern string, or the `Ignore` instance
- patterns `Array.<pattern>` Array of ignore patterns.

@@ -96,2 +96,4 @@

`pattern` could also be an `ignore` instance, so that we could easily inherit the rules of another `Ignore` instance.
### <strike>.addIgnoreFile(path)</strike>

@@ -179,3 +181,3 @@

The code of `node-ignore` is based on es6 and babel, but the dependency of babel and its preset is not included in the `dependencies` field of package.json, so that the installation process of test cases will not fail in older versions of node.
The code of `node-ignore` is based on es6 and babel, but babel and its preset is not included in the `dependencies` field of package.json, so that the installation process of test cases will not fail in older versions of node.

@@ -182,0 +184,0 @@ So use `bash install.sh` to install dependencies and `bash test.sh` to run test cases in your local machine.

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