sikessem/ignorant

πŸ™ˆ Ignore files by names or paths

Installs: 1 833

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

pkg:composer/sikessem/ignorant

0.0.0 2022-09-09 02:11 UTC

This package is auto-updated.

Last update: 2025-10-09 09:02:44 UTC


README

SIKessEm logo

πŸ™ˆ Ignore files by names or paths

The Ignorant library allows you to check if a path or name is ignored in a pattern list or in a pattern dot (.) file.

Installation

Using composer, you can install Ignorant with the following command:

composer require sikessem/ignorant

Usage

Explore our .gitignore file:

<?php

use Sikessem\Ignorant\Ignorefile;

require_once "$VENDOR_DIR/autoload.php";

$gitignore = new Ignorefile(__DIR__.'/.gitignore');

$gitignore->contains('/vendor/'); // Returns true
$gitignore->contains('/.phpunit*'); // Returns true

$gitignore->includes('/vendor/autoload.php'); // Returns true
$gitignore->includes('/.phpunit.result.cache'); // Returns true

$gitignore->excludes('src'); // Return true
$gitignore->excludes('/tests/Unit'); // Return true

License

This library is distributed under the License

Security Reports

Please send any sensitive issue to ske@sikessem.com. Thanks!