bin/poolapi.js
function cleanIdentity(identity) {
  var userPackage = {};
  Object.keys(identity).forEach(function (key) {
    if (key.indexOf('BRIGHTSOCKET:') !== 0) {
      userPackage[key] = identity[key];
    }
  });
  return userPackage;
}
function cleanIdentity(identity) {
  var userPackage = {};
  Object.keys(identity).forEach(function (key) {
    if (key.indexOf('BRIGHTSOCKET:') !== 0) {
      userPackage[key] = identity[key];
    }
  });
  return userPackage;
}
function cleanIdentity ( identity ) { var userPackage = { } ; Object . keys ( identity ) . forEach ( function ( key ) { if ( key . indexOf ( 'BRIGHTSOCKET:' ) !== 0 ) { userPackage [ key ] = identity [ key ] ; } } ) ; return userPackage ; }
Takes an incoming identity package and strips out keys
that were inserted by Brightsocket.

@param  {Object} identity  - Came in from the IDENTIFY action.

@return {Object} The clean object.
Takes an incoming identity package and strips out keys that were inserted by Brightsocket .