File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ DiscoveryUtils.prototype = {
3939 this . isJsonObject ( msg . payload ) ;
4040
4141 // Payload (text to be analysed) must be a string (content is either raw string or Buffer)
42- if ( typeof msg . payload === 'string' || isJSON ) {
42+ if ( typeof msg . payload === 'string' || isJSON ) {
4343 params . file = this . isJsonObject ( msg . payload ) ?
4444 JSON . stringify ( msg . payload ) :
4545 msg . payload ;
@@ -64,14 +64,14 @@ DiscoveryUtils.prototype = {
6464 } ,
6565
6666 buildParams : function ( msg , config ) {
67- var params = { } ;
67+ var params = { } ,
6868 me = this ;
6969
7070 params = this . buildParamsForName ( msg , config , params ) ;
7171
7272 [ 'environment_id' , 'collection_id' , 'configuration_id' ,
73- 'collection_name' ,
74- 'query' , 'description' , 'size' ] . forEach ( function ( f ) {
73+ 'collection_name' ,
74+ 'query' , 'description' , 'size' ] . forEach ( function ( f ) {
7575 params = me . buildParamsFor ( msg , config , params , f ) ;
7676 } ) ;
7777
Original file line number Diff line number Diff line change @@ -66,8 +66,8 @@ module.exports = function (RED) {
6666 // Function that checks the configuration to make sure that credentials,
6767 // payload and options have been provied in the correct format.
6868 var checkConfiguration = function ( msg , node ) {
69- var message = null ;
70- var taSettings = null ;
69+ var message = null ,
70+ taSettings = null ;
7171
7272 taSettings = checkCreds ( node . credentials ) ;
7373
@@ -136,7 +136,7 @@ module.exports = function (RED) {
136136 payloadutils . reportError ( node , msg , err ) ;
137137 node . send ( msg ) ;
138138 } ) ;
139- }
139+ }
140140
141141
142142 // This is the Tone Analyzer Node.
Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ ToneUtils.prototype = {
4242 // whether it is JSON or a Buffer
4343 checkPayload : function ( payload ) {
4444 var message = null ;
45- var isJSON = this . isJsonString ( payload ) || this . isJsonObject ( payload ) ;
45+ isJSON = this . isJsonString ( payload ) || this . isJsonObject ( payload ) ;
4646
4747 // Payload (text to be analysed) must be a string (content is either raw string or Buffer)
48- if ( typeof payload !== 'string' && isJSON !== true ) {
48+ if ( typeof payload !== 'string' && isJSON !== true ) {
4949 message = 'The payload must be either a string, JSON or a Buffer' ;
5050 }
5151
@@ -78,7 +78,7 @@ ToneUtils.prototype = {
7878 options . text = this . isJsonObject ( msg . payload ) ?
7979 JSON . stringify ( msg . payload ) :
8080 msg . payload ;
81- break
81+ break ;
8282 case 'customerEngagementTone' :
8383 options . utterances = this . isJsonString ( msg . payload ) ?
8484 JSON . parse ( msg . payload ) :
You can’t perform that action at this time.
0 commit comments