Skip to content

Commit

Permalink
Merge pull request #477 from stephenplusplus/spp--docs-dox-parser-bug
Browse files Browse the repository at this point in the history
docs: fix dox parsing issue by using RegExp object
  • Loading branch information
ryanseys committed Apr 1, 2015
2 parents a5e8543 + e1bef9a commit ed94364
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/datastore/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ function Dataset(options) {
options.apiEndpoint = 'http://' + options.apiEndpoint;
}

var trailingSlashes = new RegExp('/*$');
this.apiEndpoint = options.apiEndpoint || 'https://www.googleapis.com';
this.apiEndpoint = this.apiEndpoint.replace(/\/*$/, '');
this.apiEndpoint = this.apiEndpoint.replace(trailingSlashes, '');

this.namespace = options.namespace;
this.projectId = options.projectId;
Expand All @@ -134,6 +135,7 @@ nodeutil.inherits(Dataset, DatastoreRequest);
* @param {object=} options - Configuration object.
* @param {...*=} options.path - Key path.
* @param {string=} options.namespace - Optional namespace.
* @return {Key} A newly created Key from the options given.
*
* @example
* var key;
Expand All @@ -153,8 +155,6 @@ nodeutil.inherits(Dataset, DatastoreRequest);
* namespace: 'My-NS',
* path: ['Company', 123]
* });
*
* @return {Key} A newly created Key from the options given.
*/
Dataset.prototype.key = function(options) {
options = util.is(options, 'object') ? options : {
Expand Down

0 comments on commit ed94364

Please sign in to comment.