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

@karmaniverous/entity-tools

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@karmaniverous/entity-tools - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

1

dist/cjs/sort.js

@@ -9,2 +9,3 @@ 'use strict';

*
* @typeParam P - Entity property type. Defaults to {@link DefaultProperty | `DefaultProperty`}.
* @typeParam I - {@link Indexable | `Indexable`} property type. Defaults to {@link DefaultIndexableProperty | `DefaultIndexableProperty`}, and should be specified if necessary.

@@ -11,0 +12,0 @@ * @typeParam E - Entity type. Should be inferred from items.

@@ -8,2 +8,3 @@ 'use strict';

*
* @typeParam P - Entity property type. Defaults to {@link DefaultProperty | `DefaultProperty`}.
* @typeParam I - {@link Indexable | `Indexable`} property type. Defaults to {@link DefaultIndexableProperty | `DefaultIndexableProperty`}, and should be specified if necessary.

@@ -10,0 +11,0 @@ * @typeParam E - {@link Entity | `Entity`} type. Should be inferred from items.

9

dist/index.d.ts

@@ -37,2 +37,3 @@ /**

* @typeParam E - {@link Entity | `Entity`} type.
* @typeParam P - Entity property type. Defaults to {@link DefaultProperty | `DefaultProperty`}.
* @typeParam I - Indexable property type. Defaults to {@link DefaultIndexableProperty | `DefaultIndexableProperty`}.

@@ -56,3 +57,3 @@ *

*/
type Indexable<E extends Entity, I = DefaultIndexableProperty> = keyof {
type Indexable<E extends Entity<P>, P = DefaultProperty, I = DefaultIndexableProperty> = keyof {
[P in keyof E as E[P] extends I ? P : never]: E[P];

@@ -64,2 +65,3 @@ };

*
* @typeParam P - Entity property type. Defaults to {@link DefaultProperty | `DefaultProperty`}.
* @typeParam I - {@link Indexable | `Indexable`} property type. Defaults to {@link DefaultIndexableProperty | `DefaultIndexableProperty`}, and should be specified if necessary.

@@ -81,3 +83,3 @@ * @typeParam E - Entity type. Should be inferred from items.

*/
declare const sort: <I = DefaultIndexableProperty, E extends Entity = Entity>(items?: E[], index?: Indexable<E, I>[], desc?: { [key in Indexable<E, I>]?: boolean; }) => E[];
declare const sort: <P = DefaultProperty, I = DefaultIndexableProperty, E extends Entity<P> = Entity<P>>(items?: E[], index?: Indexable<E, P, I>[], desc?: { [key in Indexable<E, P, I>]?: boolean; }) => E[];

@@ -87,2 +89,3 @@ /**

*
* @typeParam P - Entity property type. Defaults to {@link DefaultProperty | `DefaultProperty`}.
* @typeParam I - {@link Indexable | `Indexable`} property type. Defaults to {@link DefaultIndexableProperty | `DefaultIndexableProperty`}, and should be specified if necessary.

@@ -100,4 +103,4 @@ * @typeParam E - {@link Entity | `Entity`} type. Should be inferred from items.

*/
declare const uniq: <I = DefaultIndexableProperty, E extends Entity = Entity>(items?: E[], index?: Indexable<E, I>[], delimiter?: string) => E[];
declare const uniq: <P = DefaultProperty, I = DefaultIndexableProperty, E extends Entity<P> = Entity<P>>(items?: E[], index?: Indexable<E, P, I>[], delimiter?: string) => E[];
export { type DefaultIndexableProperty, type DefaultProperty, type Entity, type Indexable, sort, uniq };

@@ -7,2 +7,3 @@ import { isNumber, isString } from 'radash';

*
* @typeParam P - Entity property type. Defaults to {@link DefaultProperty | `DefaultProperty`}.
* @typeParam I - {@link Indexable | `Indexable`} property type. Defaults to {@link DefaultIndexableProperty | `DefaultIndexableProperty`}, and should be specified if necessary.

@@ -9,0 +10,0 @@ * @typeParam E - Entity type. Should be inferred from items.

@@ -6,2 +6,3 @@ import { unique } from 'radash';

*
* @typeParam P - Entity property type. Defaults to {@link DefaultProperty | `DefaultProperty`}.
* @typeParam I - {@link Indexable | `Indexable`} property type. Defaults to {@link DefaultIndexableProperty | `DefaultIndexableProperty`}, and should be specified if necessary.

@@ -8,0 +9,0 @@ * @typeParam E - {@link Entity | `Entity`} type. Should be inferred from items.

@@ -130,3 +130,3 @@ {

"types": "dist/index.d.ts",
"version": "0.0.3",
"version": "0.0.4",
"dependencies": {

@@ -133,0 +133,0 @@ "radash": "^12.1.0"

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