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

async-later

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-later - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

dist/browser/esm.js

37

package.json
{
"name": "async-later",
"version": "0.1.5",
"version": "0.1.6",
"description": "Functional directives for Promise and AsyncIterable",
"main": "dist/esm.js",
"type": "module",
"types": "src",
"main": "./dist/node/cjs.js",
"module": "./dist/node/esm.js",
"browser": "./dist/browser/esm.js",
"scripts": {
"start": "onchange \"src/**/*.js\" \"src/**/*.ts\" -- npm run build",
"test": "VERBOSE=1 node --experimental-specifier-resolution=node dist/test.js | tap-spec-emoji",
"build": "node scripts/build.js"
"build": "node scripts/build.mjs",
"test": "VERBOSE=1 node --experimental-specifier-resolution=node dist/test.js | tap-spec-emoji"
},
"repository": {
"type": "git",
"url": "https://github.com/functionland/box/tree/main/packages/async-later"
"url": "https://github.com/functionland/borg/tree/main/libraries/async-later"
},

@@ -30,8 +30,25 @@ "keywords": [

"esbuild": "^0.12.17",
"onchange": "^7.1.0",
"streaming-iterables": "^6.0.0",
"tap-spec-emoji": "^6.1.2",
"tape": "^5.3.0",
"typescript": "^4.3.5"
"typescript": "^4.3.5",
"esbuild-plugin-babel": "~0.2.3",
"@babel/preset-typescript": "~7.15.0",
"@babel/preset-env": "~7.15.6",
"@babel/plugin-transform-runtime": "~7.15.0"
},
"exports": {
".": {
"browser": {
"default": "./dist/browser/esm.js"
},
"node": {
"require":"./dist/node/cjs.js",
"import":"./dist/node/esm.js"
}
}
},
"dependencies": {
"@babel/runtime": "~7.15.4"
}
}
}
export type Resolve<T> = (value?: T | PromiseLike<T>) => void;
export interface ObservableLike<T> {
subscribe(next: (value?: T) => void, error: (error: any) => void, complete: () => void);
subscribe(next: (value?: T) => void, error: (error: any) => void, complete: () => void):any;
}

@@ -6,0 +6,0 @@

@@ -8,3 +8,5 @@ import { Resolve } from '.';

});
return [promise, resolve];
if(resolve!== undefined)
return [promise, resolve] ;
throw('Something Wrong')
}

@@ -12,3 +12,3 @@ import { ObservableLike, iterateLater } from '.';

): AsyncIterable<T> {
if (typeof value[Symbol.asyncIterator] === 'function') return value as AsyncIterable<T>;
if (typeof (value as AsyncIterable<T>)[Symbol.asyncIterator] === 'function') return value as AsyncIterable<T>;

@@ -19,3 +19,3 @@ if (typeof (value as ObservableLike<T>).subscribe === 'function')

let iterate: () => AsyncIterable<T>;
if (typeof value[Symbol.iterator] === 'function') {
if (typeof (value as Iterable<T>)[Symbol.iterator] === 'function') {
iterate = async function* () {

@@ -22,0 +22,0 @@ for (const element of value as Iterable<PromiseLike<T> | T>) {

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