async-later
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"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>) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
164071
18
1857
1
10
2
3
No
+ Added@babel/runtime@~7.15.4
+ Added@babel/runtime@7.15.4(transitive)
+ Addedregenerator-runtime@0.13.11(transitive)