Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@flock/kotlin-ts

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flock/kotlin-ts - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

2

esm/Iterable.d.ts

@@ -362,3 +362,3 @@ import { Sequence } from "@flock/kotlin-ts/Sequence";

*/
export declare const groupBy: <T, K>(self: Iterable<T>, keySelector: (it: T) => K) => Map<K, T[]>;
export declare const groupBy: <T, K, V>(self: Iterable<T>, keySelector: (it: T) => K, valueTransform?: (it: T) => V) => Map<K, V[]>;
/**

@@ -365,0 +365,0 @@ * Groups values returned by the [valueTransform] function applied to each element of the original collection

@@ -407,3 +407,3 @@ import * as tsplus_module_1 from "@flock/kotlin-ts/Sequence";

*/
export const groupBy = (self, keySelector) => {
export const groupBy = (self, keySelector, valueTransform = (it) => it) => {
const map = new Map();

@@ -413,8 +413,3 @@ for (const it of self) {

const value = map.get(key);
if (value == null) {
map.set(key, [it]);
}
else {
map.set(key, plus_1(value, it));
}
map.set(key, plus_1((value == null ? [] : value), valueTransform(it)));
}

@@ -421,0 +416,0 @@ return map;

@@ -362,3 +362,3 @@ import { Sequence } from "@flock/kotlin-ts/Sequence";

*/
export declare const groupBy: <T, K>(self: Iterable<T>, keySelector: (it: T) => K) => Map<K, T[]>;
export declare const groupBy: <T, K, V>(self: Iterable<T>, keySelector: (it: T) => K, valueTransform?: (it: T) => V) => Map<K, V[]>;
/**

@@ -365,0 +365,0 @@ * Groups values returned by the [valueTransform] function applied to each element of the original collection

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

*/
const groupBy = (self, keySelector) => {
const groupBy = (self, keySelector, valueTransform = (it) => it) => {
const map = new Map();

@@ -452,8 +452,3 @@ for (const it of self) {

const value = map.get(key);
if (value == null) {
map.set(key, [it]);
}
else {
map.set(key, plus_1(value, it));
}
map.set(key, plus_1((value == null ? [] : value), valueTransform(it)));
}

@@ -460,0 +455,0 @@ return map;

{
"name": "@flock/kotlin-ts",
"version": "0.0.13",
"version": "0.0.14",
"author": "Kasper Peulen",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

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