Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
24559d1582 | |||
d92657b130 | |||
f8f34bf8a3 | |||
861d2c04b3 |
18
package-lock.json
generated
18
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/lik",
|
"name": "@pushrocks/lik",
|
||||||
"version": "4.0.11",
|
"version": "4.0.13",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -1104,14 +1104,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/lik": {
|
"@pushrocks/lik": {
|
||||||
"version": "4.0.10",
|
"version": "4.0.11",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.10.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.11.tgz",
|
||||||
"integrity": "sha512-qlVVIWo/Ysp/cyUyHi2mgtFyT0E9xXLCpewBAb7TrwnuRKrSMrmE4YsqPsGOhBxqziSEOPaXZmWaMLwKqjvQiQ==",
|
"integrity": "sha512-XgOcLbHiFqLZGv5C0/Okrv21sv5iGCBF1pB4YKACeu/Jycsdb7hPc7/+/t4mN1UVw2bBOPQBHNouZf3ahDZwCw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartdelay": "^2.0.9",
|
"@pushrocks/smartdelay": "^2.0.9",
|
||||||
"@pushrocks/smartmatch": "^1.0.7",
|
"@pushrocks/smartmatch": "^1.0.7",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrx": "^2.0.12",
|
"@pushrocks/smartrx": "^2.0.14",
|
||||||
"@pushrocks/smarttime": "^3.0.18",
|
"@pushrocks/smarttime": "^3.0.18",
|
||||||
"@pushrocks/smartunique": "^3.0.3",
|
"@pushrocks/smartunique": "^3.0.3",
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
@ -1328,11 +1328,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartrx": {
|
"@pushrocks/smartrx": {
|
||||||
"version": "2.0.14",
|
"version": "2.0.15",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.14.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.15.tgz",
|
||||||
"integrity": "sha512-WmJf8s/nb829l1tq0dEgpwdODCZruMUG2o4aW4V1yypi5AcV6+HFGS0mcL6mRUtEFz0OUwqNGUNXQhbyLtZMYQ==",
|
"integrity": "sha512-bvxyO19sUgWj7S/WflVO7QVYggTUXoM4rCYn+Akid844CC5zoSzIRx9Egm2xeMD6y4WbBbFWpHr67L7nEYxGWQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^4.0.8",
|
"@pushrocks/lik": "^4.0.11",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"rxjs": "^6.5.5"
|
"rxjs": "^6.5.5"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/lik",
|
"name": "@pushrocks/lik",
|
||||||
"version": "4.0.11",
|
"version": "4.0.13",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "light little helpers for node",
|
"description": "light little helpers for node",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
@ -33,9 +33,8 @@
|
|||||||
"@pushrocks/smartdelay": "^2.0.9",
|
"@pushrocks/smartdelay": "^2.0.9",
|
||||||
"@pushrocks/smartmatch": "^1.0.7",
|
"@pushrocks/smartmatch": "^1.0.7",
|
||||||
"@pushrocks/smartpromise": "^3.0.6",
|
"@pushrocks/smartpromise": "^3.0.6",
|
||||||
"@pushrocks/smartrx": "^2.0.14",
|
"@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
|
||||||
|
Reference in New Issue
Block a user