 @_$paramap                = require 'pull-paramap'
 unpack_sym                = Symbol 'unpack'
 # pull_infinite             = require 'pull-stream/sources/infinite'
-Event_emitter             = require 'eventemitter3'
+@_map_errors              = require './_map_errors'
 #...........................................................................................................
 after                     = ( dts, f ) -> setTimeout f, dts * 1000
 defer                     = setImmediate

  delete x[ key ]
  return R


#===========================================================================================================
# EVENTS AND EMITTERS
#-----------------------------------------------------------------------------------------------------------
@_new_event_emitter = ->
  R               = new Event_emitter()
  _emit           = R.emit.bind R
  #.........................................................................................................
  R.emit = ( event_name, P... ) ->
    _emit '*',  event_name, P... unless event_name is '*'
    _emit       event_name, P...
  # #.........................................................................................................
  # R.on = ( name, P... ) ->
  #   # ### experimental: accept only 'namespaced' event names a la 'foo/bar' and known names
  #   # so as to prevent accidental usage of bogus event names like `end`, `close`, `finish` etc: ###
  #   # unless ( '/' in name ) or ( name is 'stop' )
  #   #   throw new Error "µ1763 unknown event name #{rpr name}"
  #   emitter.on name, P...
  #.........................................................................................................
  return R

# original_map = require 'pull-stream/throughs/map'
# @_map_errors = ( P... ) -> original_map P...

### This is the original `pull-stream/throughs/map` implementation with the `try`/`catch` clause removed so
all errors are thrown. This, until we find out how to properly handle errors the pull-streams way. Note
that `_map_errors` behaves exactly like `pull-stream/throughs/filter` which tells me this shouldn't be
too wrong. Also observe that while any library may require all errors to be given to a callback or
somesuch, no library can really enforce that because not all client code may be wrapped, so I think
we're stuck with throwing errors anyway. ###

```
var prop = require('pull-stream/util/prop')

this._map_errors = function (mapper) {
  if(!mapper) return return_id
  mapper = prop(mapper)
  return function (read) {
    return function (abort, cb) {
      read(abort, function (end, data) {
        // try {
        data = !end ? mapper(data) : null
        // } catch (err) {
        //   return read(err, function () {
        //     return cb(err)
        //   })
        // }
        cb(end, data)
      })
    }
  }
}
```

#===========================================================================================================
# ISA METHODS

help                      = CND.get_logger 'help',      badge
urge                      = CND.get_logger 'urge',      badge
echo                      = CND.echo.bind CND
#...........................................................................................................
PATH                      = require 'path'
FS                        = require 'fs'
CP                        = require 'child_process'
glob                      = require 'globby'
#...........................................................................................................
new_pushable              = require 'pull-pushable'
$pull_split               = require 'pull-split'
# $pull_stringify           = require 'pull-stringify'
$pull_utf8_decoder        = require 'pull-utf8-decoder'
