Socket
Socket
Sign inDemoInstall

@definitelytyped/utils

Package Overview
Dependencies
Maintainers
7
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@definitelytyped/utils - npm Package Compare versions

Comparing version 0.0.155 to 0.0.156-next.0

4

dist/collections.d.ts

@@ -40,3 +40,3 @@ export declare function initArray<T>(length: number, makeElement: (i: number) => T): T[];

/**
* Maps an array. If the mapped value is an array, it is spread into the result.
* Maps an array. The mapped value is spread into the result.
*

@@ -46,3 +46,3 @@ * @param array The array to map.

*/
export declare function flatMap<T, U>(array: readonly T[] | undefined, mapfn: (x: T, i: number) => U | readonly U[] | undefined): readonly U[];
export declare function flatMap<T, U>(array: readonly T[] | undefined, mapfn: (x: T, i: number) => readonly U[]): readonly U[];
export declare function unique<T>(arr: Iterable<T>): T[];

@@ -49,0 +49,0 @@ export declare function sortObjectKeys<T extends {

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

/**
* Maps an array. If the mapped value is an array, it is spread into the result.
* Maps an array. The mapped value is spread into the result.
*

@@ -131,11 +131,3 @@ * @param array The array to map.

for (let i = 0; i < array.length; i++) {
const v = mapfn(array[i], i);
if (v) {
if (isArray(v)) {
result = addRange(result, v);
}
else {
result = append(result, v);
}
}
result = addRange(result, mapfn(array[i], i));
}

@@ -142,0 +134,0 @@ }

{
"name": "@definitelytyped/utils",
"version": "0.0.155",
"version": "0.0.156-next.0",
"description": "Shared utilities for DefinitelyTyped tools",

@@ -39,3 +39,3 @@ "homepage": "https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/utils#readme",

},
"gitHead": "87d6ebe276b211cf814fd73388b1d18486601ba6"
"gitHead": "8a6232e6ff9cf8b2da4e8e1602a4a2c92393bda8"
}

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