Socket
Socket
Sign inDemoInstall

steampipes

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

steampipes - npm Package Compare versions

Comparing version 5.3.0 to 6.0.0

26

lib/standard-transforms.js

@@ -1,2 +0,1 @@

// Generated by CoffeeScript 2.5.1
(function() {

@@ -207,3 +206,3 @@ 'use strict';

//-----------------------------------------------------------------------------------------------------------
this.$before_first = function(transform) {
this.$once_before_first = function(transform) {
/* Call transform once before any data item comes down the stream (if any). Transform must only accept

@@ -234,3 +233,18 @@ a single `send` argument and can send as many data items down the stream which will be prepended

//-----------------------------------------------------------------------------------------------------------
this.$after_last = function(transform) {
this.$once_with_first = function(transform) {
/* Call transform once with the first data item (if any). */
var is_first;
is_first = true;
return this.$((d, send) => {
if (!is_first) {
return send(d);
}
is_first = false;
transform(d, send);
return null;
});
};
//-----------------------------------------------------------------------------------------------------------
this.$once_after_last = function(transform) {
/* Call transform once after any data item comes down the stream (if any). Transform must only accept

@@ -261,3 +275,3 @@ a single `send` argument and can send as many data items down the stream which will be appended

//-----------------------------------------------------------------------------------------------------------
this.$async_before_first = function(transform) {
this.$once_async_before_first = function(transform) {
/* Call transform once before any data item comes down the stream (if any). Transform must only accept

@@ -296,3 +310,3 @@ a single `send` argument and can send as many data items down the stream which will be prepended

//-----------------------------------------------------------------------------------------------------------
this.$async_after_last = function(transform) {
this.$once_async_after_last = function(transform) {
/* Call transform once before any data item comes down the stream (if any). Transform must only accept

@@ -331,3 +345,1 @@ a single `send` argument and can send as many data items down the stream which will be prepended

}).call(this);
//# sourceMappingURL=standard-transforms.js.map

@@ -1,6 +0,6 @@

// Generated by CoffeeScript 2.5.1
(function() {
//###########################################################################################################
'use strict';
var CND, FS, OS, PATH, alert, badge, debug, defer, echo, help, info, inspect, isa, jr, log, read, rpr, test, type_of, types, urge, validate, warn, whisper, xrpr;
//###########################################################################################################
CND = require('cnd');

@@ -73,10 +73,10 @@

//-----------------------------------------------------------------------------------------------------------
this["modifiers ($before_first)"] = function(T, done) {
var $, $async, $before_first, $drain, $show, $transform, SP;
this["modifiers ($once_before_first)"] = function(T, done) {
var $, $async, $drain, $once_before_first, $show, $transform, SP;
SP = require('../..');
//.........................................................................................................
({$, $async, $drain, $before_first, $show} = SP.export());
({$, $async, $drain, $once_before_first, $show} = SP.export());
//.........................................................................................................
$transform = () => {
return $before_first(function(send) {
return $once_before_first(function(send) {
debug('^12287^');

@@ -107,10 +107,38 @@ return send("may I introduce");

//-----------------------------------------------------------------------------------------------------------
this["modifiers ($after_last)"] = function(T, done) {
var $, $after_last, $async, $drain, $show, $transform, SP;
this["modifiers ($once_with_first)"] = function(T, done) {
var $, $async, $drain, $once_with_first, $show, SP;
SP = require('../..');
//.........................................................................................................
({$, $async, $drain, $after_last, $show} = SP.export());
({$, $async, $drain, $once_with_first, $show} = SP.export());
(() => { //.........................................................................................................
var matcher, pipeline, source;
source = "Behind the Looking-Glass".split(/\s+/);
matcher = ["Behold!—Behind", "the", "Looking-Glass"];
pipeline = [];
pipeline.push(source);
pipeline.push($once_with_first(function(d, send) {
return send("Behold!—" + d);
}));
pipeline.push($show());
pipeline.push($drain((result) => {
help(jr(result));
T.eq(result, matcher);
return done();
}));
SP.pull(...pipeline);
return null;
})();
//.........................................................................................................
return null;
};
//-----------------------------------------------------------------------------------------------------------
this["modifiers ($once_after_last)"] = function(T, done) {
var $, $async, $drain, $once_after_last, $show, $transform, SP;
SP = require('../..');
//.........................................................................................................
({$, $async, $drain, $once_after_last, $show} = SP.export());
//.........................................................................................................
$transform = () => {
return $after_last(function(send) {
return $once_after_last(function(send) {
debug('^12287^');

@@ -141,10 +169,10 @@ return send("is an interesting book");

//-----------------------------------------------------------------------------------------------------------
this["modifiers ($async_before_first)"] = function(T, done) {
var $, $async, $async_before_first, $drain, $show, $transform, SP;
this["modifiers ($once_async_before_first)"] = function(T, done) {
var $, $async, $drain, $once_async_before_first, $show, $transform, SP;
SP = require('../..');
//.........................................................................................................
({$, $async, $drain, $async_before_first, $show} = SP.export());
({$, $async, $drain, $once_async_before_first, $show} = SP.export());
//.........................................................................................................
$transform = () => {
return $async_before_first(function(send, done) {
return $once_async_before_first(function(send, done) {
debug('^12287^');

@@ -179,10 +207,10 @@ defer(function() {

//-----------------------------------------------------------------------------------------------------------
this["modifiers ($async_after_last)"] = function(T, done) {
var $, $async, $async_after_last, $drain, $show, $transform, SP;
this["modifiers ($once_async_after_last)"] = function(T, done) {
var $, $async, $drain, $once_async_after_last, $show, $transform, SP;
SP = require('../..');
//.........................................................................................................
({$, $async, $drain, $async_after_last, $show} = SP.export());
({$, $async, $drain, $once_async_after_last, $show} = SP.export());
//.........................................................................................................
$transform = () => {
return $async_after_last(function(send, done) {
return $once_async_after_last(function(send, done) {
debug('^12287^');

@@ -218,11 +246,10 @@ defer(function() {

if (module.parent == null) {
// test @
// test @[ "modifiers ($before_first)" ]
// test @[ "modifiers ($after_last)" ]
// test @[ "modifiers ($async_before_first)" ]
test(this["modifiers ($async_after_last)"]);
test(this);
}
// test @[ "modifiers ($once_before_first)" ]
// test @[ "modifiers ($once_after_last)" ]
// test @[ "modifiers ($once_async_before_first)" ]
// test @[ "modifiers ($once_async_after_last)" ]
}).call(this);
//# sourceMappingURL=modifiers.test.js.map

@@ -131,2 +131,3 @@ // Generated by CoffeeScript 2.5.1

// resolve await sort probe
//.........................................................................................................
done();

@@ -133,0 +134,0 @@ return null;

{
"name": "steampipes",
"version": "5.3.0",
"version": "6.0.0",
"description": "Fast, simple data pipelines",

@@ -5,0 +5,0 @@ "main": "lib/main.js",

@@ -290,4 +290,17 @@

* [ ] implement `send.skip n` (or `send.drop n`) to drop next n datoms
* [ ] fix reading from, writing to files
* [ ] implement `$split_tsv()`
* [ ] implement
* `$once_before_first()`
* `$once_after_last()`
* `$once_async_before_first()`
* `$once_async_after_last()`
* `$once_with_first()`
* `$once_async_with_first()`
* `$once_with_last()`
* `$once_async_with_last()`
* `$once_with_nth()`
* `$once_async_with_nth()`
using modifiers instead (`$ { once: [ 'first', 'last', ], }, transform (d, send ) ->`) to avoid API bloat
### Future: JS Pipeline Operator

@@ -294,0 +307,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc