fix(core): update
This commit is contained in:
parent
f8f34bf8a3
commit
d92657b130
@ -35,7 +35,6 @@
|
|||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrx": "^2.0.15",
|
"@pushrocks/smartrx": "^2.0.15",
|
||||||
"@pushrocks/smarttime": "^3.0.18",
|
"@pushrocks/smarttime": "^3.0.18",
|
||||||
"@pushrocks/smartunique": "^3.0.3",
|
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
"symbol-tree": "^3.2.4"
|
"symbol-tree": "^3.2.4"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
import * as plugins from './lik.plugins';
|
import * as plugins from './lik.plugins';
|
||||||
import { FastMap } from './lik.fastmap';
|
import { FastMap } from './lik.fastmap';
|
||||||
|
|
||||||
|
export const uni = (prefix: string = 'uni') => {
|
||||||
|
return `${prefix}xxxxxxxxxxx`.replace(/[xy]/g, c => {
|
||||||
|
const r = (Math.random() * 16) | 0;
|
||||||
|
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
||||||
|
return v.toString(16);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export interface IObjectmapForEachFunction<T> {
|
export interface IObjectmapForEachFunction<T> {
|
||||||
(itemArg: T): void;
|
(itemArg: T): void;
|
||||||
}
|
}
|
||||||
@ -64,7 +72,7 @@ export class ObjectMap<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// otherwise lets create it
|
// otherwise lets create it
|
||||||
const uniqueKey = plugins.smartunique.shortId();
|
const uniqueKey = uni('key');
|
||||||
this.addMappedUnique(uniqueKey, objectArg);
|
this.addMappedUnique(uniqueKey, objectArg);
|
||||||
return uniqueKey;
|
return uniqueKey;
|
||||||
}
|
}
|
||||||
|
@ -6,9 +6,8 @@ import * as smartmatch from '@pushrocks/smartmatch';
|
|||||||
import * as smartpromise from '@pushrocks/smartpromise';
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
import * as smartrx from '@pushrocks/smartrx';
|
import * as smartrx from '@pushrocks/smartrx';
|
||||||
import * as smarttime from '@pushrocks/smarttime';
|
import * as smarttime from '@pushrocks/smarttime';
|
||||||
import * as smartunique from '@pushrocks/smartunique';
|
|
||||||
|
|
||||||
export { smartdelay, smartmatch, smartpromise, smartrx, smarttime, smartunique };
|
export { smartdelay, smartmatch, smartpromise, smartrx, smarttime };
|
||||||
|
|
||||||
// ==============
|
// ==============
|
||||||
// third party
|
// third party
|
||||||
|
Loading…
Reference in New Issue
Block a user