Socket
Socket
Sign inDemoInstall

asyncy

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncy - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

package.json
{
"name": "asyncy",
"version": "0.0.2",
"version": "0.0.3",
"description": "A utility for creating aysnc functions",

@@ -5,0 +5,0 @@ "engines": {},

@@ -10,2 +10,4 @@ # asyncy

The current releases of Chrome, Firefox, Edge, and Node.js support the raw, un-transpiled code.
## Inline Usage

@@ -17,5 +19,7 @@

```
const {err,result,args} = await asyncy.inline(fs.readFile,"mystuff.json");
const {err,result,args} = await asyncy.inline(fs,fs.readFile,"mystuff.json");
```
The first argument can either be `null` or the scope in which the function should be invoked, i.e. the `this` context.
`err` will be `null` or an `Error` instance

@@ -31,3 +35,3 @@

```
const {err,result,args} = await asyncy.inline(fs.readFile,"mystuff.json");
const {err,result,args} = await asyncy.inline(fs,fs.readFile,"mystuff.json");
if(err) throw err;

@@ -40,3 +44,3 @@ ```

```
const {err,result,args} = await asyncy.inline(fs.readFile,"mystuff.json",(err,arg1[,arg2...]) => { console.log(arg1,"allocated"); });
const {err,result,args} = await asyncy.inline(fs,fs.readFile,"mystuff.json",(err,arg1[,arg2...]) => { console.log(arg1,"allocated"); });
```

@@ -51,3 +55,3 @@

```
const {err,result,args} = await asyncy.inline(fs.readFile,"mystuff.json");
const {err,result,args} = await asyncy.inline(fs,fs.readFile,"mystuff.json");
if(err) ... handle error ...

@@ -68,5 +72,7 @@ console.log(result[0],"allocated");

or you can `async` an entire object (`asyncy` will skip functions with names that end in the token "Sync", where "S" is capitalized.):
There is no contect provided at re-define time; however, it can be provided at invocation time, e.g. `readFile.call(scope,fileName)`.
You can also `async` an entire object (`asyncy` will skip functions with names that end in the token "Sync", where "S" is capitalized.):
```

@@ -90,4 +96,7 @@ fs = asyncy(fs,true),

2017-06-03 v0.0.3 improved documentation
2017-06-03 v0.0.2 Simplified code, added documentation
2017-06-02 Initial public release
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