iopipe / turtle

Turtle - functional composition for building lambda architectures in NodeJS
Apache License 2.0
153 stars 9 forks source link

Require pipescripts to use CommonJS format #33

Closed ewindisch closed 8 years ago

ewindisch commented 8 years ago

Implement a CommonJS compatible format for pipescripts, allowing them to be imported and used directly via NodeJS.

Simply define module.export as a function which receives input from the previous function. Example:

    module.exports = function(input) {
      var data = JSON.decode(input)
      return data['extract_this_field']
    }
ewindisch commented 8 years ago

Needs updated docs.