Socket
Socket
Sign inDemoInstall

decor

Package Overview
Dependencies
1
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.1 to 0.0.2

lib/do.js

2

component.json

@@ -5,3 +5,3 @@ {

"description": "assorted function decorators",
"version": "0.0.1",
"version": "0.0.2",
"keywords": ["decorator","promise"],

@@ -8,0 +8,0 @@ "dependencies": {

### 0.0.1 - 2012/12/24
* Added `decor.deferred`
### 0.0.2 - 2012/12/24
* Added onward export of q
// Generated by CoffeeScript 1.6.3
module.exports = {
deferred: require('./deferred')
deferred: require('./deferred'),
Q: require('q')
};
{
"name": "decor",
"version": "0.0.1",
"version": "0.0.2",
"description": "assorted function decorators",

@@ -5,0 +5,0 @@ "repository": "git@github.com:nomilous/decor.git",

@@ -0,1 +1,4 @@

`npm install decor` 0.0.2 <br />
`component install nomilous/decor` 0.0.2 <br />
decor

@@ -44,48 +47,17 @@ =====

#### Before and After
### `decor.Q`
**Before**
* onward export of [q](https://github.com/kriskowal/q)
* so that it doesn't need to be installed twice by npm
```coffee
{defer} = require 'q'
fn = (arg1) ->
Dev / Test
----------
deferral = defer()
doSomethingAsync arg1, (err, res) ->
deferral.resolve res
return deferral.promise
fn('arg1').then ...
```
**After**
```coffee
{deferred} = require 'decor'
fn = deferred ({resolve, reject}, arg1) ->
doSomethingAsync arg1, (err, res) ->
resolve res
fn('arg1').then ...
```
### Dev
```
# sudo npm install ipso-cli -g
npm install
ipso -m
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc