# Operations declared by barnard59-base
# https://barnard59.zazuko.com/packages/base

@prefix code: <https://code.described.at/>.
@prefix p: <https://pipeline.described.at/>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.

<https://barnard59.zazuko.com/operations/base/batch> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Groups incoming items into arrays of the given size.";
  rdfs:label "Batch";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/batch.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/combine> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Combines multiple streams to a single stream connecting them in the given order.";
  rdfs:label "Combine";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/combine.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/concat> a p:Operation, p:Readable;
  rdfs:comment "Concatenates the content of the given streams to a single stream.";
  rdfs:label "Concat";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/concat.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/concat/object> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Concatenates the content of the given streams to a single stream.";
  rdfs:label "Concat (Object)";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/concat.js#object>
    ].

<https://barnard59.zazuko.com/operations/base/filter> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Forwards incoming chunks if they pass the filter function.";
  rdfs:label "Filter";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/filter.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/flatten> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Separates incoming arrays into their elements and emits each element as a single chunk.";
  rdfs:label "Flatten";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/flatten.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/forEach> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Calls a sub pipeline for each incoming chunk.";
  rdfs:label "For Each";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/forEach.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/glob> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Match files using the given pattern and emits each filename as a single chunk.";
  rdfs:label "Glob";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/glob.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/json/parse> a p:Operation, p:ReadableObjectMode, p:Writable;
  rdfs:comment "Converts each chunk to an object by calling JSON.parse().";
  rdfs:label "Parse JSON";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/json.js#parse>
    ].

<https://barnard59.zazuko.com/operations/base/json/stringify> a p:Operation, p:Readable, p:WritableObjectMode;
  rdfs:comment "Converts each chunk to a JSON string by calling JSON.stringify().";
  rdfs:label "Serialize JSON";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/json.js#stringify>
    ].

<https://barnard59.zazuko.com/operations/base/limit> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Limits the amount of forwarded chunks and discards any chunks after reaching the limit.";
  rdfs:label "Limit";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/limit.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/map> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Converts each chunk using the given function.";
  rdfs:label "Map";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/map.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/nul> a p:Operation, p:WritableObjectMode;
  rdfs:comment "Dummy output stream, just like /dev/null.";
  rdfs:label "/dev/null";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/dev-nul.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/offset> a p:Operation, p:ReadableObjectMode, p:WritableObjectMode;
  rdfs:comment "Discards all chunks before the given offset.";
  rdfs:label "Offset";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/offset.js#default>
    ].

<https://barnard59.zazuko.com/operations/base/stdin> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Reads from standard input";
  rdfs:label "stdin";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/process.js#stdin>
    ].

<https://barnard59.zazuko.com/operations/base/stdout> a p:Operation, p:Readable, p:Writable;
  rdfs:comment "Writes the incoming data to stdout and also forwards the data to the stream output.";
  rdfs:label "stdout";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/process.js#stdout>
    ].

<https://barnard59.zazuko.com/operations/base/streamValues> a p:Operation, p:ReadableObjectMode;
  rdfs:comment "Creates a readable stream from the given array.";
  rdfs:label "Stream values";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/Readable.js#from>
    ].

<https://barnard59.zazuko.com/operations/base/toString> a p:Operation, p:Readable, p:WritableObjectMode;
  rdfs:comment "Converts each chunk to a string by calling .toString().";
  rdfs:label "To String";
  code:implementedBy [ a code:EcmaScriptModule;
      code:link <node:barnard59-base/toString.js#default>
    ].
