fix(core): update
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
import * as plugins from './lik.plugins';
|
||||
|
||||
/**
|
||||
* fast map allows for very quick lookups of objects with a unique key
|
||||
*/
|
||||
|
@ -2,17 +2,17 @@
|
||||
// @pushrocks
|
||||
// ==============
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smartmatch from '@pushrocks/smartmatch';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartrx from '@pushrocks/smartrx';
|
||||
import * as smarttime from '@pushrocks/smarttime';
|
||||
import * as smartunique from '@pushrocks/smartunique';
|
||||
|
||||
export { smartdelay, smartpromise, smartrx, smarttime, smartunique };
|
||||
export { smartdelay, smartmatch, smartpromise, smartrx, smarttime, smartunique };
|
||||
|
||||
// ==============
|
||||
// third party
|
||||
// ==============
|
||||
import minimatch from 'minimatch';
|
||||
const symbolTree = require('symbol-tree');
|
||||
|
||||
export { minimatch, symbolTree };
|
||||
export { symbolTree };
|
||||
|
@ -1,4 +1,5 @@
|
||||
import * as plugins from './lik.plugins';
|
||||
import { SmartMatch } from '@pushrocks/smartmatch';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
|
||||
/**
|
||||
* allows you to easily keep track of a bunch of strings
|
||||
@ -58,9 +59,10 @@ export class Stringmap {
|
||||
* checks stringPresence with minimatch
|
||||
*/
|
||||
public checkMinimatch(miniMatchStringArg: string): boolean {
|
||||
const smartMatchInstance = new SmartMatch(miniMatchStringArg);
|
||||
let foundMatch: boolean = false;
|
||||
for (const stringItem of this._stringArray) {
|
||||
if (plugins.minimatch(stringItem, miniMatchStringArg)) {
|
||||
if (smartMatchInstance.match(stringItem)) {
|
||||
foundMatch = true;
|
||||
}
|
||||
}
|
||||
@ -91,7 +93,7 @@ export class Stringmap {
|
||||
* register a new trigger
|
||||
*/
|
||||
public registerUntilTrue(functionArg: TTriggerFunction, callbackArg?: () => any) {
|
||||
const trueDeferred = plugins.smartpromise.defer();
|
||||
const trueDeferred = smartpromise.defer();
|
||||
this._triggerUntilTrueFunctionArray.push(() => {
|
||||
const result = functionArg(this.getStringArray());
|
||||
if (result === true) {
|
||||
|
Reference in New Issue
Block a user