Compare commits

..

8 Commits

Author SHA1 Message Date
24559d1582 4.0.13 2020-05-27 23:50:08 +00:00
d92657b130 fix(core): update 2020-05-27 23:50:07 +00:00
f8f34bf8a3 4.0.12 2020-05-27 20:22:46 +00:00
861d2c04b3 fix(core): update 2020-05-27 20:22:45 +00:00
5845d74160 4.0.11 2020-05-27 20:07:28 +00:00
9dd952e6b7 fix(core): update 2020-05-27 20:07:28 +00:00
742a711359 4.0.10 2020-05-27 18:54:07 +00:00
8878a0ef8b fix(core): update 2020-05-27 18:54:07 +00:00
4 changed files with 21 additions and 15 deletions

18
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/lik", "name": "@pushrocks/lik",
"version": "4.0.9", "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.8", "version": "4.0.11",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.8.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-4.0.11.tgz",
"integrity": "sha512-0rug63ehpauG21++samf7yIy3wJaGEa4+MbN0jUBkurc6g/PG5Qx8rE8USgm089gZUsoj4pNS/xyEDLQIsCOlQ==", "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.10", "@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.11", "version": "2.0.15",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.11.tgz", "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartrx/-/smartrx-2.0.15.tgz",
"integrity": "sha512-vW+aMIkymjtxMN4jKBSFUfITLA9Jw8s+wnh4nPz+gVnNIFU9u06CjifJLkO3hUcTfhkLFJsdJnMfOOYs2DHGAQ==", "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"
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/lik", "name": "@pushrocks/lik",
"version": "4.0.9", "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.11", "@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"
}, },

View File

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

View File

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