Socket
Socket
Sign inDemoInstall

react

Package Overview
Dependencies
Maintainers
1
Versions
1977
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

examples/default-events1.js

20

examples/default1.js

@@ -26,12 +26,12 @@ 'use strict';

var loadAndSave = react('loadAndSave', 'fName, uid, outDir, cb -> err, html, user, bytes',
loadUser, 'uid -> err, user', // calling async loadUser with uid, cb called with err and user
loadFile, 'filename -> err, filedata',
markdown, 'filedata -> returns html', // using a sync function
prepareDirectory, 'outDirname -> err, dircreated',
writeOutput, 'html, user -> err, bytesWritten', { after: prepareDirectory }, // only after prepareDirectory done
loadEmailTemplate, ' -> err, emailmd',
markdown, 'emailmd -> returns emailHtml', // using a sync function
customizeEmail, 'user, emailHtml -> returns custEmailHtml',
deliverEmail, 'custEmailHtml -> err, deliveredEmail', { after: writeOutput } // only after writeOutput is done
); // callback output params
loadUser, 'uid, cb -> err, user', // calling async loadUser with uid, cb called with err and user
loadFile, 'filename, cb -> err, filedata',
markdown, 'filedata -> html', // using a sync function
prepareDirectory, 'outDirname, cb -> err, dircreated',
writeOutput, 'html, user, cb -> err, bytesWritten', { after: prepareDirectory }, // only after prepareDirectory done
loadEmailTemplate, 'cb -> err, emailmd',
markdown, 'emailmd -> emailHtml', // using a sync function
customizeEmail, 'user, emailHtml, cb -> custEmailHtml',
deliverEmail, 'custEmailHtml, cb -> err, deliveredEmail', { after: writeOutput } // only after writeOutput is done
);

@@ -38,0 +38,0 @@ //in another module you can use this as any other exported fn

@@ -66,8 +66,8 @@ 'use strict';

/**
Parse the variable arguments into in/out params, tasks, options
Parse the variable arguments into in/out params, options, tasks
*/
function parseVargs(vargs) {
var inOutParamStr = vargs.shift() || '';
// if last arg is object, pop it off as options
var options = (vargs.length && typeof(vargs[vargs.length - 1]) === 'object') ? vargs.pop() : { };
// if next arg is object, shift it off as options
var options = (vargs.length && typeof(vargs[0]) === 'object') ? vargs.shift() : { };
var taskDefArr = vargs; // rest are for the tasks

@@ -74,0 +74,0 @@ var defObj = {

{
"name": "react",
"description": "React is a javascript module to make it easier to work with asynchronous code, by reducing boilerplate code and improving error and exception handling while allowing variable and task dependencies when defining flow.",
"version": "0.2.0",
"version": "0.2.1",
"author": "Jeff Barczewski <jeff.barczewski@gmail.com>",

@@ -6,0 +6,0 @@ "repository": { "type": "git", "url": "http://github.com/jeffbski/react.git" },

@@ -132,5 +132,5 @@ 'use strict';

var r = react('myName', 'a, b, cb -> err, c, d',
{ otherOptFoo: 'foo'}, // main flow options
falpha, 'a, b, cb -> err, c',
fbeta, 'a, b, cb -> err, d, e',
{ name: 'myflow', otherOptFoo: 'foo'}
fbeta, 'a, b, cb -> err, d, e'
);

@@ -143,3 +143,3 @@ t.deepEqual(r.ast.inParams, ['a', 'b']);

t.deepEqual(r.ast.outTask, { a: ['c', 'd'], type: 'finalcb' });
t.equal(r.ast.name, 'myflow', 'name should match if supplied');
t.equal(r.ast.name, 'myName', 'name should match');
t.equal(r.ast.otherOptFoo, 'foo', 'other options should pass through');

@@ -225,5 +225,5 @@ t.end();

var r = react.selectFirst('myName', 'a, b, cb -> c',
{ otherOptFoo: 'foo'}, // main options
falpha, 'a, b, cb -> err, c',
fbeta, 'a, b -> c',
{ otherOptFoo: 'foo'}
fbeta, 'a, b -> c'
);

@@ -230,0 +230,0 @@ t.equal(r.ast.name, 'myName');

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