New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

collection-utils

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collection-utils - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

6

dist/index.d.ts
export declare const hashCodeInit = 17;
export declare function addHashCode(acc: number, h: number): number;
export declare function definedMap<T, U>(x: T | undefined, f: (x: T) => U): U | undefined;
export declare function hasOwnProperty(obj: object, name: string): boolean;
export declare function mapOptional<T, U>(x: T | undefined, f: (x: T) => U): U | undefined;
export declare function iterableFind<T>(it: Iterable<T>, p: (v: T) => boolean): T | undefined;

@@ -39,2 +38,5 @@ export declare function iterableEvery<T>(it: Iterable<T>, p: (v: T) => boolean): boolean;

}): Map<string, V>;
export declare function mapToObject<V>(m: Map<string, V>): {
[k: string]: V;
};
export declare function mapFromIterable<K, V>(it: Iterable<K>, valueForKey: (k: K) => V): Map<K, V>;

@@ -41,0 +43,0 @@ export declare function mapFind<K, V>(it: Iterable<[K, V]>, p: (v: V, k: K) => boolean): V | undefined;

@@ -17,3 +17,3 @@ "use strict";

exports.addHashCode = addHashCode;
function definedMap(x, f) {
function mapOptional(x, f) {
if (x === undefined)

@@ -23,7 +23,3 @@ return undefined;

}
exports.definedMap = definedMap;
function hasOwnProperty(obj, name) {
return Object.prototype.hasOwnProperty.call(obj, name);
}
exports.hasOwnProperty = hasOwnProperty;
exports.mapOptional = mapOptional;
function iterableFind(it, p) {

@@ -291,2 +287,10 @@ for (const v of it) {

exports.mapFromObject = mapFromObject;
function mapToObject(m) {
const result = {};
for (const [k, v] of m) {
result[k] = v;
}
return result;
}
exports.mapToObject = mapToObject;
function mapFromIterable(it, valueForKey) {

@@ -293,0 +297,0 @@ const result = new Map();

{
"name": "collection-utils",
"version": "0.0.5",
"version": "0.0.6",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc