New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

emmi

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

emmi - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

4

dist/helpers/filter.d.ts
import { type MaybePromise } from "./iterate.js";
export declare function filter<T, S extends T>(arr: MaybePromise<T>[], predicate: (t: T) => t is S): Promise<Array<S>>;
type NotBoolean<S> = S extends boolean ? never : S;
export declare function filter<T, S>(arr: MaybePromise<T>[], predicate: (t: T) => NotBoolean<S> | undefined): Promise<Array<NotBoolean<S>>>;
export declare function filter<T>(arr: MaybePromise<T>[], predicate: (t: T) => boolean): Promise<Array<T>>;
export {};
import { type MaybePromise } from "./iterate.js";
export declare function find<T, S extends T>(arr: MaybePromise<T>[], predicate: (t: T) => t is S): Promise<S | undefined>;
type NotBoolean<S> = S extends boolean ? never : S;
/**
* find element that matches a predicate
*
* Can alter return type by returning a non-boolean value
* @example
* const foo: "foo" = find(arr, (item) => item === 'foo' ? item : foo)
*/
export declare function find<T, S>(arr: MaybePromise<T>[], predicate: (t: T) => NotBoolean<S> | undefined): Promise<NotBoolean<S> | undefined>;
export declare function find<T>(arr: MaybePromise<T>[], predicate: (t: T) => boolean): Promise<T | undefined>;
export {};
{
"name": "emmi",
"version": "0.6.1",
"version": "0.7.0",
"type": "module",

@@ -5,0 +5,0 @@ "main": "./dist/index.cjs",

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