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

@opencreek/ext

Package Overview
Dependencies
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencreek/ext - npm Package Compare versions

Comparing version 1.1.0--canary.1.c7fdd1ae303a59b3ef529a08735b2d44b9564296.0 to 1.1.0

5

build/collections.d.ts

@@ -20,3 +20,2 @@ declare type PairSplit<T> = T extends [infer F, infer L] ? [F[], L[]] : never;

mapNotNullish<O>(transformer: (el: T) => O): NonNullable<O>[];
maxBy(selector: ((el: T) => number) | ((el: T) => string) | ((el: T) => bigint) | ((el: T) => Date)): T | undefined;
maxBy(selector: (el: T) => string): T | undefined;

@@ -26,3 +25,2 @@ maxBy(selector: (el: T) => bigint): T | undefined;

maxBy(selector: (el: T) => Date): T | undefined;
maxOf<S extends ((el: T) => number) | ((el: T) => bigint)>(selector: S): ReturnType<S> | undefined;
maxOf(selector: (el: T) => bigint): bigint | undefined;

@@ -35,5 +33,3 @@ maxOf(selector: (el: T) => number): number | undefined;

minBy(selector: (el: T) => Date): T | undefined;
minBy(selector: ((el: T) => number) | ((el: T) => string) | ((el: T) => bigint) | ((el: T) => Date)): T | undefined;
minOf(selector: (el: T) => bigint): bigint | undefined;
minOf<S extends ((el: T) => number) | ((el: T) => bigint)>(selector: S): ReturnType<S> | undefined;
minOf(selector: (el: T) => number): number | undefined;

@@ -49,3 +45,2 @@ minWith(comparator: (a: T, b: T) => number): T | undefined;

}): T[][];
sortBy(selector: ((el: T) => number) | ((el: T) => string) | ((el: T) => bigint) | ((el: T) => Date)): T[];
sortBy(selector: (el: T) => Date): T[];

@@ -52,0 +47,0 @@ sortBy(selector: (el: T) => bigint): T[];

2

build/collections.js

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

function filterNotNullish() {
return this.filter((it) => it != undefined);
return this.filter((it) => it != null);
}

@@ -28,0 +28,0 @@ function extendArray(key) {

@@ -0,1 +1,13 @@

# v1.1.0 (Thu Sep 30 2021)
#### 🚀 Enhancement
- Add Deno collections as Array extensions and some object extensions [#1](https://github.com/opencreek/typescript-extensions/pull/1) ([@mhlz](https://github.com/mhlz))
#### Authors: 1
- Mischa Holz ([@mhlz](https://github.com/mhlz))
---
# v1.0.2 (Wed Sep 29 2021)

@@ -2,0 +14,0 @@

{
"name": "@opencreek/ext",
"version": "1.1.0--canary.1.c7fdd1ae303a59b3ef529a08735b2d44b9564296.0",
"version": "1.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -7,3 +7,3 @@ import * as collections from "@opencreek/deno-std-collections"

function filterNotNullish<T>(this: Array<T>): Array<NonNullable<T>> {
return this.filter((it): it is NonNullable<T> => it != undefined)
return this.filter((it): it is NonNullable<T> => it != null)
}

@@ -84,9 +84,2 @@

mapNotNullish<O>(transformer: (el: T) => O): NonNullable<O>[]
maxBy(
selector:
| ((el: T) => number)
| ((el: T) => string)
| ((el: T) => bigint)
| ((el: T) => Date)
): T | undefined
maxBy(selector: (el: T) => string): T | undefined

@@ -96,5 +89,2 @@ maxBy(selector: (el: T) => bigint): T | undefined

maxBy(selector: (el: T) => Date): T | undefined
maxOf<S extends ((el: T) => number) | ((el: T) => bigint)>(
selector: S
): ReturnType<S> | undefined
maxOf(selector: (el: T) => bigint): bigint | undefined

@@ -107,13 +97,3 @@ maxOf(selector: (el: T) => number): number | undefined

minBy(selector: (el: T) => Date): T | undefined
minBy(
selector:
| ((el: T) => number)
| ((el: T) => string)
| ((el: T) => bigint)
| ((el: T) => Date)
): T | undefined
minOf(selector: (el: T) => bigint): bigint | undefined
minOf<S extends ((el: T) => number) | ((el: T) => bigint)>(
selector: S
): ReturnType<S> | undefined
minOf(selector: (el: T) => number): number | undefined

@@ -132,9 +112,2 @@ minWith(comparator: (a: T, b: T) => number): T | undefined

): T[][]
sortBy(
selector:
| ((el: T) => number)
| ((el: T) => string)
| ((el: T) => bigint)
| ((el: T) => Date)
): T[]
sortBy(selector: (el: T) => Date): T[]

@@ -141,0 +114,0 @@ sortBy(selector: (el: T) => bigint): T[]

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