fix(core): update

This commit is contained in:
2020-05-25 22:04:21 +00:00
parent 2e9fe308df
commit 453c6d6ae8
5 changed files with 70 additions and 29 deletions

View File

@ -1,5 +1,3 @@
import * as plugins from './lik.plugins';
/**
* fast map allows for very quick lookups of objects with a unique key
*/

View File

@ -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 };

View File

@ -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) {