5 Commits

Author SHA1 Message Date
2a6fc4110e 1.0.6 2020-02-25 19:55:33 +00:00
c82bb44007 fix(core): update 2020-02-25 19:55:32 +00:00
afd8db1acf 1.0.5 2020-02-25 19:54:15 +00:00
74a08d6e39 fix(core): update 2020-02-25 19:54:15 +00:00
a92cb2e612 1.0.4 2020-02-25 19:03:42 +00:00
4 changed files with 25 additions and 17 deletions

22
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartmatch",
"version": "1.0.3",
"version": "1.0.6",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1012,6 +1012,21 @@
"p-defer": "^1.0.0"
}
},
"matcher": {
"version": "2.1.0",
"resolved": "https://verdaccio.lossless.one/matcher/-/matcher-2.1.0.tgz",
"integrity": "sha512-o+nZr+vtJtgPNklyeUKkkH42OsK8WAfdgaJE2FNxcjLPg+5QbeEoT6vRj8Xq/iv18JlQ9cmKsEu0b94ixWf1YQ==",
"requires": {
"escape-string-regexp": "^2.0.0"
},
"dependencies": {
"escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://verdaccio.lossless.one/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="
}
}
},
"mem": {
"version": "4.3.0",
"resolved": "https://verdaccio.lossless.one/mem/-/mem-4.3.0.tgz",
@@ -1256,11 +1271,6 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
"picomatch": {
"version": "2.2.1",
"resolved": "https://verdaccio.lossless.one/picomatch/-/picomatch-2.2.1.tgz",
"integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA=="
},
"pump": {
"version": "3.0.0",
"resolved": "https://verdaccio.lossless.one/pump/-/pump-3.0.0.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartmatch",
"version": "1.0.3",
"version": "1.0.6",
"private": false,
"description": "a minimal matching library using picomatch",
"main": "dist/index.js",
@@ -21,7 +21,7 @@
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {
"picomatch": "^2.2.1"
"matcher": "^2.1.0"
},
"files": [
"ts/**/*",

View File

@@ -1,14 +1,12 @@
import * as plugins from './smartmatch.plugins';
export class SmartMatch {
private picomatch;
public globString;
constructor(globStringArg: string) {
this.globString = globStringArg;
this.picomatch = plugins.picomatch(this.globString);
public wildcard: string;
constructor(wildcardArg: string) {
this.wildcard = wildcardArg;
}
public match(matchStringArg): boolean {
return this.picomatch(matchStringArg);
public match(matchStringArg: string): boolean {
return plugins.matcher.isMatch(matchStringArg, this.wildcard);
}
}

View File

@@ -1,6 +1,6 @@
// third party scope
import picomatch from 'picomatch';
import matcher from 'matcher';
export {
picomatch
matcher
}