code: function(value) {
    if (value && value._bsontype) {
      if (_.includes([ 'Decimal128', 'Long' ], value._bsontype)) {
        return value.toString();
      }
      if (_.includes([ 'Double', 'Int32' ], value._bsontype)) {
        return String(value.value);
      }
    }
    if (_.isString(value)) {
      return value;
    }
    return String(value);
  }
docs: var debug = require('debug')('mongodb-schema:stream'); 
  extracts a Javascript string from a BSON type to compute unique values.
  
  @param {Any} value     value to be converted to a string
  @return {String}       converted value