Socket
Socket
Sign inDemoInstall

pipe-functions

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pipe-functions - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

5

package.json
{
"name": "pipe-functions",
"version": "1.0.2",
"version": "1.0.3",
"description": "Pipe functions in a Unix-like style. It supports Promises (async) anywhere in the pipeline and every step will be executed sequentially. The return (resolve in case of Promises) of each function will be passed in as an argument to the next one",

@@ -25,3 +25,4 @@ "homepage": "https://github.com/DiegoZoracKy/pipe-functions/",

"scripts": {
"test": "mocha ./tests -b"
"test": "mocha ./tests/main.test.js",
"test:all": "mocha ./tests -b"
},

@@ -28,0 +29,0 @@ "devDependencies": {

@@ -10,4 +10,2 @@ /*globals describe, it*/

const fetchAndSetBandName = v => new Promise((resolve, reject) => setTimeout(() => resolve(`Pink Floyd - ${v}`), 1000));
const fetchBandName = ({ song }) => new Promise((resolve, reject) => setTimeout(() => resolve({ song, band: 'Pink Floyd' }), 1000));
const concatBandAndSong = ({ song, band }) => `${band} - ${song}`;

@@ -35,14 +33,2 @@ describe('Pipe', function() {

});
describe('Functions && Promises (sync && async) - Destructuring', function() {
it(`'time' should be turned into 'Pink Floyd - Time'`, function(done) {
pipe({ song: 'Time' }, fetchBandName, concatBandAndSong)
.then(result => assert.equal(`Pink Floyd - Time`, result))
.then(() => done());
});
});
});
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