Comparing version 0.0.17 to 0.0.18
@@ -5,1 +5,3 @@ export declare type PojoSet<T extends string | number> = { | ||
export declare function toPojoSet<T extends string | number>(arr: readonly T[]): PojoSet<T>; | ||
export declare function removeItem<T>(arr: T[], item: T): T[]; | ||
export declare function groupBy<T, U extends keyof T>(arr: T[], by: U): Map<T[U], T[]>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.toPojoSet = void 0; | ||
exports.groupBy = exports.removeItem = exports.toPojoSet = void 0; | ||
function toPojoSet(arr) { | ||
@@ -11,1 +11,19 @@ const result = {}; | ||
exports.toPojoSet = toPojoSet; | ||
function removeItem(arr, item) { | ||
const index = arr.indexOf(item); | ||
arr.splice(index, 1); | ||
return arr; | ||
} | ||
exports.removeItem = removeItem; | ||
function groupBy(arr, by) { | ||
const result = new Map(); | ||
for (const item of arr) { | ||
const key = item[by]; | ||
if (result.has(key)) | ||
result.get(key).push(item); | ||
else | ||
result.set(key, [item]); | ||
} | ||
return result; | ||
} | ||
exports.groupBy = groupBy; |
{ | ||
"name": "pbkit", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"author": "JongChan Choi <jong@chan.moe>", | ||
@@ -8,4 +8,13 @@ "license": "(MIT OR Apache-2.0)", | ||
"type": "git", | ||
"url": "git+https://github.com/riiid/pbkit.git" | ||
"url": "git+https://github.com/pbkit/pbkit.git" | ||
}, | ||
"bin": { | ||
"pb-gen-ts": "node/cli/pb-gen-ts.js" | ||
}, | ||
"preferUnplugged": true, | ||
"dependencies": { | ||
"@yarnpkg/fslib": "^2.6.0-rc.8", | ||
"@yarnpkg/libzip": "^2.2.2", | ||
"mri": "^1.2.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7469850
76
7271
3
2
+ Added@yarnpkg/fslib@^2.6.0-rc.8
+ Added@yarnpkg/libzip@^2.2.2
+ Addedmri@^1.2.0
+ Added@types/emscripten@1.39.13(transitive)
+ Added@yarnpkg/fslib@2.10.4(transitive)
+ Added@yarnpkg/libzip@2.3.0(transitive)
+ Addedmri@1.2.0(transitive)
+ Addedtslib@1.14.1(transitive)