nl_tokens: / * function push that return a message inside the socket connection to the client .
pl_tokens: function push ( type , packet ) { let msg = { 'type' : type != null ? 'results' : 'other' , 'value' : type , 'data' : packet . data ( ) } ; // emit unique event once the constraints request is done from the couchDB. returning results to client if ( type === 'found' || type === 'notFound' || type === 'errorConstraints' ) packet . socket . emit ( 'resultsConstraints' , msg ) ; if ( type === 'success' || type === 'errorAddJob' || type === 'curlError' ) packet . socket . emit ( 'addingResponse' , <mask> ) ; if ( type === 'indexSuccess' || type === 'indexFailed' ) packet . socket . emit ( 'indexationResponse' , msg ) ; }