🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@slowpoison/async-utils

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slowpoison/async-utils - npm Package Compare versions

Comparing version
0.0.5
to
0.0.6
+10
test/async-utils-ts-test.ts
import { GeneratorUtils } from '@slowpoison/async-utils'
import { describe, it } from 'mocha'
// Only used for compilation against index.d.ts. No assertions needed.
describe('GeneratorUtils', () => {
it('should be defined', () => {
let lines = [ 1, 2, 3 ]
GeneratorUtils.filter(lines, (line) => line > 1)
})
})
+10
-3
declare module '@slowpoison/async-utils' {
export function first(iterable: Iterable<T>, predicate: (value: T) => boolean): T
export function *filter(iterable: Iterable<T>, predicate: (value: T) => boolean): IterableIterator<T>
export function *map(iterable: Iterable<T>, mapper: (value: T) => any): IterableIterator<T>
namespace AsyncUtils {
export class AsyncUtils {
static callbackToPromise(method, callback): Promise<any>
}
}
namespace GeneratorUtils {
export function first<T>(iterable: Iterable<T>, predicate: (value: T) => boolean): T
export function filter<T>(iterable: Iterable<T>, predicate: (value: T) => boolean): Generator<T>
export function map<T>(iterable: Iterable<T>, mapper: (value: T) => any): Generator<T>
}
}
{
"name": "@slowpoison/async-utils",
"version": "0.0.5",
"version": "0.0.6",
"description": "A set of utils for working with async code",

@@ -9,3 +9,3 @@ "main": "index.cjs",

"scripts": {
"test": "mocha"
"test": "mocha && tsc --noEmit"
},

@@ -12,0 +12,0 @@ "repository": {