Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #93

Merged
merged 1 commit into from
Jun 9, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions libs/fetcher.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ function parseResponse(response) {
}

/**
* The queue sweeps and processs items in the queue when there are items in the queue.
* When a item is pushed into the queue, a timeout is set to guarantee the item will be processd soon.
* If there are any item in the queue before a item, this item can be processd sooner than its timeout.
* The queue sweeps and processes items in the queue when there are items in the queue.
* When a item is pushed into the queue, a timeout is set to guarantee the item will be processed soon.
* If there are any item in the queue before a item, this item can be processed sooner than its timeout.
*
* @class Queue
* @constructor
* @param {String} id ID for the queue.
* @param {Object} config The configuration object.
* @param {Function} sweepFn The function to be called when queue is sweeped.
* @param {Function} sweepFn The function to be called when queue is swept.
* @param {Array} sweepFn.items The current items in the queue.
* @param {Function} callback The function to be used to process a given item in the queue.
* @param {Object} callback.item The obj that was popped from the queue.
Expand All @@ -76,7 +76,7 @@ function Queue(id, config, sweepFn, callback) {
* @type String
*/
/**
* The configuraiton object for this queue.
* The configuration object for this queue.
* @property config
* @type Object
*/
Expand All @@ -86,7 +86,7 @@ Queue.prototype = {
* Once an item is pushed to the queue,
* a timer will be set up immediate to sweep and process the items. The time of the
* timeout depends on queue's config (20ms by default). If it is set to a number <= 0,
* the queue will be sweeped and processed right away.
* the queue will be swept and processed right away.
* @method push
* @param {Object} item The item object to be pushed to the queue
* @chainable
Expand Down
2 changes: 1 addition & 1 deletion libs/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function parseParamValues (params) {
* @class Fetcher
* @param {Object} options configuration options for Fetcher
* @param {Object} [options.req] The request object. It can contain per-request/context data.
* @param {string} [options.xhrPath="/api"] The path for XHR requests. Will be ignored serverside.
* @param {string} [options.xhrPath="/api"] The path for XHR requests. Will be ignored server side.
* @constructor
*/
function Fetcher(options) {
Expand Down
16 changes: 8 additions & 8 deletions libs/util/http.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ module.exports = {
* @param {Number} [config.timeout=3000] Timeout (in ms) for each request
* @param {Object} config.retry Retry config object.
* @param {Number} [config.retry.interval=200] The start interval unit (in ms).
* @param {Number} [config.retry.max_retries=2] Nmber of max retries.
* @param {Number} [config.retry.max_retries=2] Number of max retries.
* @param {Boolean} [config.cors] Whether to enable CORS & use XDR on IE8/9.
* @param {Function} callback The callback funciton, with two params (error, response)
* @param {Function} callback The callback function, with two params (error, response)
*/
get : function (url, headers, config, callback) {
doXhr(METHOD_GET, url, headers, NULL, config, callback);
Expand All @@ -227,9 +227,9 @@ module.exports = {
* @param {Object} config The config object. No retries for PUT.
* @param {Number} [config.timeout=3000] Timeout (in ms) for each request
* @param {Number} [config.retry.interval=200] The start interval unit (in ms).
* @param {Number} [config.retry.max_retries=2] Nmber of max retries.
* @param {Number} [config.retry.max_retries=2] Number of max retries.
* @param {Boolean} [config.cors] Whether to enable CORS & use XDR on IE8/9.
* @param {Function} callback The callback funciton, with two params (error, response)
* @param {Function} callback The callback function, with two params (error, response)
*/
put : function (url, headers, data, config, callback) {
doXhr(METHOD_PUT, url, headers, data, config, callback);
Expand All @@ -244,9 +244,9 @@ module.exports = {
* @param {Number} [config.timeout=3000] Timeout (in ms) for each request
* @param {Boolean} [config.unsafeAllowRetry=false] Whether to allow retrying this post.
* @param {Number} [config.retry.interval=200] The start interval unit (in ms).
* @param {Number} [config.retry.max_retries=2] Nmber of max retries.
* @param {Number} [config.retry.max_retries=2] Number of max retries.
* @param {Boolean} [config.cors] Whether to enable CORS & use XDR on IE8/9.
* @param {Function} callback The callback funciton, with two params (error, response)
* @param {Function} callback The callback function, with two params (error, response)
*/
post : function (url, headers, data, config, callback) {
doXhr(METHOD_POST, url, headers, data, config, callback);
Expand All @@ -259,9 +259,9 @@ module.exports = {
* @param {Object} config The config object. No retries for DELETE.
* @param {Number} [config.timeout=3000] Timeout (in ms) for each request
* @param {Number} [config.retry.interval=200] The start interval unit (in ms).
* @param {Number} [config.retry.max_retries=2] Nmber of max retries.
* @param {Number} [config.retry.max_retries=2] Number of max retries.
* @param {Boolean} [config.cors] Whether to enable CORS & use XDR on IE8/9.
* @param {Function} callback The callback funciton, with two params (error, response)
* @param {Function} callback The callback function, with two params (error, response)
*/
'delete' : function (url, headers, config, callback) {
doXhr(METHOD_DELETE, url, headers, NULL, config, callback);
Expand Down