File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,8 +115,9 @@ function Dataset(options) {
115115 options . apiEndpoint = 'http://' + options . apiEndpoint ;
116116 }
117117
118+ var trailingSlashes = new RegExp ( '/*$' ) ;
118119 this . apiEndpoint = options . apiEndpoint || 'https://www.googleapis.com' ;
119- this . apiEndpoint = this . apiEndpoint . replace ( / \/ * $ / , '' ) ;
120+ this . apiEndpoint = this . apiEndpoint . replace ( trailingSlashes , '' ) ;
120121
121122 this . namespace = options . namespace ;
122123 this . projectId = options . projectId ;
@@ -134,6 +135,7 @@ nodeutil.inherits(Dataset, DatastoreRequest);
134135 * @param {object= } options - Configuration object.
135136 * @param {...*= } options.path - Key path.
136137 * @param {string= } options.namespace - Optional namespace.
138+ * @return {Key } A newly created Key from the options given.
137139 *
138140 * @example
139141 * var key;
@@ -153,8 +155,6 @@ nodeutil.inherits(Dataset, DatastoreRequest);
153155 * namespace: 'My-NS',
154156 * path: ['Company', 123]
155157 * });
156- *
157- * @return {Key } A newly created Key from the options given.
158158 */
159159Dataset . prototype . key = function ( options ) {
160160 options = util . is ( options , 'object' ) ? options : {
You can’t perform that action at this time.
0 commit comments