Permalink
Browse files

Minor wording changes.

  • Loading branch information...
1 parent 6189930 commit 35629b8a3ac24780283e31f7ab4709c66f131e1e @mcantelon committed Dec 31, 2010
Showing with 6 additions and 6 deletions.
  1. +3 −3 README.md
  2. +3 −3 lib/calais.js
View
@@ -23,16 +23,16 @@ Run quick example:
## Options ##
In addition to using the "set" method, a hash of option settings can be passed
-as the second argument when constructing. For example:
+as the second argument during intialization. For example:
var calais = new Calais('<YOUR API KEY>', {'cleanResult': false})
By default, node-calais will return fetched results as a Javascript object.
Alternatively, the Calais standard "outputFormat" input parameter can be set to
standard output formats (see Calais documentation).
-Any standard Calais input parameter can be passed as an option, as well as the
-'cleanResult' parameter which will return a simplified Javascript object if
+Any standard Calais input parameter can be specified as an option, as well as
+the 'cleanResult' parameter which will return a simplified Javascript object if
"outputFormat" hasn't been set to something other than the default ('object').
## Test ##
View
@@ -106,15 +106,15 @@ Calais.prototype = {
// serialize the returned data
var calaisData = data.join('')
- // take note of whether JSON output was requested
+ // take note of whether Javascript object output was requested
var jsOutput = (calais.options.outputFormat == 'object')
- // parse to a Javascript object if outputting JSON
+ // parse to a Javascript object if requested
var result = (jsOutput)
? JSON.parse(calaisData)
: calaisData
- // ignore cleanResult preference if not outputting JSON
+ // ignore cleanResult preference if not requesting an object
result = (jsOutput && calais.options.cleanResult)
? calais.clean_result(result)
: result

0 comments on commit 35629b8

Please sign in to comment.