From 7a52ddeba2a68388b544f529d2d92104420f77b0 Mon Sep 17 00:00:00 2001 From: Shipwreckt Date: Fri, 31 Oct 2025 20:02:14 +0000 Subject: Changed from static to 11ty! --- node_modules/maximatch/index.js | 39 ++++++++++++++++++++ node_modules/maximatch/license | 21 +++++++++++ node_modules/maximatch/package.json | 44 +++++++++++++++++++++++ node_modules/maximatch/readme.md | 71 +++++++++++++++++++++++++++++++++++++ 4 files changed, 175 insertions(+) create mode 100644 node_modules/maximatch/index.js create mode 100644 node_modules/maximatch/license create mode 100644 node_modules/maximatch/package.json create mode 100644 node_modules/maximatch/readme.md (limited to 'node_modules/maximatch') diff --git a/node_modules/maximatch/index.js b/node_modules/maximatch/index.js new file mode 100644 index 0000000..c8fa8d6 --- /dev/null +++ b/node_modules/maximatch/index.js @@ -0,0 +1,39 @@ +'use strict'; +var minimatch = require('minimatch'); +var arrayUnion = require('array-union'); +var arrayDiffer = require('array-differ'); +var arrify = require('arrify'); + +module.exports = function (list, patterns, options) { + list = arrify(list); + patterns = arrify(patterns); + + if (list.length === 0 || patterns.length === 0) { + return []; + } + + options = options || {}; + + return patterns.reduce(function (ret, pattern) { + if (typeof pattern === 'function') { + + return arrayUnion(ret, list.filter(pattern)); + + } else if (pattern instanceof RegExp) { + + return arrayUnion(ret, list.filter(function(item) { + return pattern.test(item); + })); + + } else { + var process = arrayUnion; + + if (pattern[0] === '!') { + pattern = pattern.slice(1); + process = arrayDiffer; + } + + return process(ret, minimatch.match(list, pattern, options)); + } + }, []); +}; diff --git a/node_modules/maximatch/license b/node_modules/maximatch/license new file mode 100644 index 0000000..5ec444d --- /dev/null +++ b/node_modules/maximatch/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus, Jon Schlinkert, contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/maximatch/package.json b/node_modules/maximatch/package.json new file mode 100644 index 0000000..b04eb33 --- /dev/null +++ b/node_modules/maximatch/package.json @@ -0,0 +1,44 @@ +{ + "name": "maximatch", + "version": "0.1.0", + "description": "Extends multimatch() with support for filter functions and regular expressions", + "license": "MIT", + "repository": "timkendrick/maximatch", + "author": { + "email": "timkendrick@gmail.com", + "name": "Tim Kendrick" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "mocha" + }, + "files": [ + "index.js" + ], + "keywords": [ + "expand", + "find", + "glob", + "globbing", + "globs", + "match", + "matcher", + "minimatch", + "multimatch", + "pattern", + "patterns", + "wildcard" + ], + "dependencies": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + }, + "devDependencies": { + "chai": "^3.4.1", + "mocha": "*" + } +} diff --git a/node_modules/maximatch/readme.md b/node_modules/maximatch/readme.md new file mode 100644 index 0000000..c0d5383 --- /dev/null +++ b/node_modules/maximatch/readme.md @@ -0,0 +1,71 @@ +# maximatch [![Build Status](https://travis-ci.org/timkendrick/maximatch.svg?branch=master)](https://travis-ci.org/timkendrick/maximatch) + +> Extends [`multimatch()`](https://github.com/sindresorhus/multimatch) with support for filter functions and regular expressions + + +## Install + +```sh + +$ npm install --save maximatch +``` + + +## Usage + +```js +var maximatch = require('maximatch'); + +maximatch(['unicorn', 'cake', 'rainbows'], ['*', '!cake']); +//=> ['unicorn', 'rainbows'] + +maximatch(['unicorn', 'cake', 'rainbows'], function(path) { return path.length > 4; }); +//=> ['unicorn', 'rainbows'] + +maximatch(['unicorn', 'cake', 'rainbows'], /^[^k]+$/); +//=> ['unicorn', 'rainbows'] + +maximatch(['unicorn', 'cake', 'rainbows'], [function(path) { return path.charAt(0) === 'u'; }, /w/]); +//=> ['unicorn', 'rainbows'] +``` + +See the [tests](https://github.com/timkendrick/multimatch/blob/master/test.js) for more usage examples and expected matches. + + +## API + +Same as [`minimatch.match()`](https://github.com/isaacs/minimatch#minimatchmatchlist-pattern-options) except for `pattern` also accepting a filter function, a regular expression, or an array that can contain globs, filter functions and regular expressions. + +```js +var results = maximatch(paths, patterns); +``` + +The return value is an array of matching paths. + + +## How multiple patterns work + +Positive patterns (e.g. `foo` or `*`) add to the results, while negative patterns (e.g. `!foo`) subtract from the results. + +Therefore a lone negation (e.g. `['!foo']`) will never match anything – use `['*', '!foo']` instead. + + +## Globbing patterns + +Just a quick overview. + +- `*` matches any number of characters, but not `/` +- `?` matches a single character, but not `/` +- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part +- `{}` allows for a comma-separated list of "or" expressions +- `!` at the beginning of a pattern will negate the match + + +## Related + +See [globby](https://github.com/sindresorhus/globby) if you need to match against the filesystem instead of a list. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com), [Jon Schlinkert](https://github.com/jonschlinkert), [Tim Kendrick](https://github.com/timkendrick) -- cgit v1.2.3