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

breeze

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

breeze - npm Package Compare versions

Comparing version 1.0.1 to 1.1.1

test/index.js

22

breeze.js
/**
* Initializes breeze class
* Breeze Constructor
*
* Accepts a then method as the first argument.
*
* @param {Function} method initialization method, optional.
*/
function Breeze () {
function Breeze (method) {
this.steps = []
if (typeof method === 'function') {
this.then(method)
}
}

@@ -93,3 +101,3 @@

Breeze.prototype.when = Breeze.prototype.maybe = function _breezeMaybeWhen (arg, next) {
if (arg) {
if ((typeof arg === 'function' && arg.apply(this.context, this.args || [])) || arg) {
this.hasMaybeHappened = true

@@ -114,3 +122,3 @@ this.steps.push(next)

if (arg && !this.hasNoneHappened) {
if (!this.hasNoneHappened && ((typeof arg === 'function' && arg.apply(this.context, this.args || [])) || arg)) {
this.hasSomeHappened = true

@@ -137,3 +145,3 @@ this.steps.push(next)

if (!this.hasSome) {
throw new Error("Cannot add none callback before some callback")
throw new Error("Cannot add .none check before adding .some checks")
}

@@ -193,4 +201,4 @@

*/
module.exports = function breeze () {
return new Breeze()
module.exports = function breeze (method) {
return new Breeze(method)
}
{
"name": "breeze",
"version": "1.0.1",
"version": "1.1.1",
"description": "Functional async flow control library",
"main": "breeze.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node test/index.js"
},

@@ -21,3 +21,7 @@ "repository": {

"try",
"catch"
"catch",
"promises",
"thennable",
"bluebird",
"q"
],

@@ -29,3 +33,6 @@ "author": "Nijiko Yonskai",

},
"homepage": "https://github.com/Nijikokun/breeze#readme"
"homepage": "https://github.com/Nijikokun/breeze#readme",
"devDependencies": {
"tess": "^1.0.0"
}
}
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