7 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
716ed45149 1.0.3 2020-02-25 19:02:52 +00:00
7d240b3461 fix(core): update 2020-02-25 19:02:52 +00:00
5 changed files with 42 additions and 7 deletions

17
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartmatch", "name": "@pushrocks/smartmatch",
"version": "1.0.2", "version": "1.0.6",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@@ -1012,6 +1012,21 @@
"p-defer": "^1.0.0" "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": { "mem": {
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://verdaccio.lossless.one/mem/-/mem-4.3.0.tgz", "resolved": "https://verdaccio.lossless.one/mem/-/mem-4.3.0.tgz",

View File

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

View File

@@ -2,7 +2,12 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as smartmatch from '../ts/index'; import * as smartmatch from '../ts/index';
tap.test('first test', async () => { tap.test('first test', async () => {
console.log(smartmatch.standardExport); const smartMatchInstance = new smartmatch.SmartMatch('*.any');
const isAMatch = smartMatchInstance.match('wow.any');
const isNotAMatch = smartMatchInstance.match('wow.not');
expect(isAMatch).to.be.true;
expect(isNotAMatch).to.be.false;
}); });
tap.start(); tap.start();

View File

@@ -1,3 +1,12 @@
import * as plugins from './smartmatch.plugins'; import * as plugins from './smartmatch.plugins';
export let standardExport = 'Hi there! :) This is an exported string'; export class SmartMatch {
public wildcard: string;
constructor(wildcardArg: string) {
this.wildcard = wildcardArg;
}
public match(matchStringArg: string): boolean {
return plugins.matcher.isMatch(matchStringArg, this.wildcard);
}
}

View File

@@ -1,2 +1,6 @@
const removeme = {}; // third party scope
export { removeme }; import matcher from 'matcher';
export {
matcher
}