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

@bedrock-ui/utils

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bedrock-ui/utils - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

3

lib/cjs/utils/groupBy/groupBy.d.ts

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

export declare function groupBy(): void;
import type { TypeofArray } from '../../types/array';
export declare function groupBy<T extends TypeofArray<T>[], P extends keyof TypeofArray<T>>(array: T, property: P): Map<TypeofArray<T>[P], TypeofArray<T>[]>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.groupBy = void 0;
function groupBy() { }
function groupBy(array, property) {
const map = new Map();
array.forEach((element) => {
map.set(element[property], [...(map.get(element[property]) || []), element]);
});
return map;
}
exports.groupBy = groupBy;

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

export declare function groupBy(): void;
import type { TypeofArray } from '../../types/array';
export declare function groupBy<T extends TypeofArray<T>[], P extends keyof TypeofArray<T>>(array: T, property: P): Map<TypeofArray<T>[P], TypeofArray<T>[]>;

@@ -1,1 +0,7 @@

export function groupBy() { }
export function groupBy(array, property) {
const map = new Map();
array.forEach((element) => {
map.set(element[property], [...(map.get(element[property]) || []), element]);
});
return map;
}
{
"name": "@bedrock-ui/utils",
"version": "0.3.0",
"version": "0.3.1",
"description": "Bedrock UI Utils",

@@ -5,0 +5,0 @@ "author": "Matthew Wolfe",

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