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

@augment-vir/common

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@augment-vir/common - npm Package Compare versions

Comparing version 28.0.0 to 28.0.1

7

dist/cjs/augments/array/array.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.filterMap = exports.arrayToObject = exports.groupArrayBy = exports.repeatArray = exports.typedMap = exports.typedArrayIncludes = exports.trimArrayStrings = exports.flatten2dArray = exports.filterOutIndexes = void 0;
const get_or_set_1 = require("../object/get-or-set");
const object_entries_1 = require("../object/object-entries");

@@ -38,6 +39,4 @@ function filterOutIndexes(array, indexes) {

const key = callback(entry, index, originalArray);
if (!(key in accum)) {
accum[key] = [];
}
accum[key].push(entry);
const entryArray = (0, get_or_set_1.getOrSet)(accum, key, () => []);
entryArray.push(entry);
return accum;

@@ -44,0 +43,0 @@ }, {});

@@ -0,1 +1,2 @@

import { getOrSet } from '../object/get-or-set';
import { typedObjectFromEntries } from '../object/object-entries';

@@ -29,6 +30,4 @@ export function filterOutIndexes(array, indexes) {

const key = callback(entry, index, originalArray);
if (!(key in accum)) {
accum[key] = [];
}
accum[key].push(entry);
const entryArray = getOrSet(accum, key, () => []);
entryArray.push(entry);
return accum;

@@ -35,0 +34,0 @@ }, {});

@@ -18,3 +18,3 @@ import { AtLeastTuple } from '../tuple';

*/
export declare function groupArrayBy<ElementType, NewKey extends PropertyKey>(inputArray: ReadonlyArray<ElementType>, callback: (entry: ElementType, index: number, originalArray: ReadonlyArray<ElementType>) => NewKey): Record<NewKey, ElementType[]>;
export declare function groupArrayBy<ElementType, NewKey extends PropertyKey>(inputArray: ReadonlyArray<ElementType>, callback: (entry: ElementType, index: number, originalArray: ReadonlyArray<ElementType>) => NewKey): Partial<Record<NewKey, ElementType[]>>;
/**

@@ -24,5 +24,5 @@ * Like `groupArrayBy` but maps array entries to a single key. Meaning, the resulting object does

*/
export declare function arrayToObject<ElementType, NewKey extends PropertyKey>(inputArray: ReadonlyArray<ElementType>, callback: (entry: ElementType, index: number, originalArray: ReadonlyArray<ElementType>) => NewKey): Record<NewKey, ElementType>;
export declare function arrayToObject<ElementType, NewKey extends PropertyKey>(inputArray: ReadonlyArray<ElementType>, callback: (entry: ElementType, index: number, originalArray: ReadonlyArray<ElementType>) => NewKey): Partial<Record<NewKey, ElementType>>;
export declare function filterMap<ElementType, MappedEntry, TypeGuarded extends MappedEntry>(inputArray: ReadonlyArray<ElementType>, mapCallback: (entry: ElementType, index: number, originalArray: ReadonlyArray<ElementType>) => MappedEntry, filterCallback: (mappedOutput: MappedEntry, originalEntry: ElementType, index: number, originalArray: ReadonlyArray<ElementType>) => mappedOutput is TypeGuarded): TypeGuarded[];
export declare function filterMap<ElementType, MappedEntry>(inputArray: ReadonlyArray<ElementType>, mapCallback: (entry: ElementType, index: number, originalArray: ReadonlyArray<ElementType>) => MappedEntry, filterCallback: (mappedOutput: MappedEntry, originalEntry: ElementType, index: number, originalArray: ReadonlyArray<ElementType>) => boolean): MappedEntry[];
export {};
{
"name": "@augment-vir/common",
"version": "28.0.0",
"version": "28.0.1",
"homepage": "https://github.com/electrovir/augment-vir/tree/main/packages/common",

@@ -5,0 +5,0 @@ "bugs": {

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