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

a2a

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a2a - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

index.d.ts

10

package.json
{
"name": "a2a",
"version": "0.1.0",
"version": "0.2.0",
"description": "Async await to Array",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "nyc --reporter=html mocha"
"test": "nyc --reporter=html mocha && ts-node test/tsd.ts"
},

@@ -26,5 +27,8 @@ "repository": {

"devDependencies": {
"@types/node": "^10.12.4",
"mocha": "^5.2.0",
"nyc": "^13.0.1"
"nyc": "^13.0.1",
"ts-node": "^7.0.1",
"typescript": "^3.1.6"
}
}

@@ -18,3 +18,3 @@ # A2A - Async Await to Array

```js
const A2A = require('@iinc/a2a');
const A2A = require('a2a');
const axios = require('axios');

@@ -48,1 +48,20 @@

```
## TypeScript
```ts
import a2a from 'a2a';
a2a(Promise.resolve(123)) // => Promise<[any, number]>
.then(([error, result]) => {
console.log(result as number);
});
// => Promise<[any, number|string]>
a2a<number|string>(Promise.resolve('123'));
// => Promise<[any, Array<number|string>]>
a2a<number|string>([Promise.resolve('123')]);
// => Promise<[Error, number|string>>
a2a<number|string, Error>(Promise.resolve('123'));
```
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