@@ -158,7 +158,7 @@ class LDP {
158158 extension = ''
159159 }
160160
161- // allways return a valid URL.
161+ // always return a valid URL.
162162 const resourceUrl = await ldp . getAvailableUrl ( hostname , containerPath , { slug, extension, container } )
163163 debug . handlers ( 'POST -- Will create at: ' + resourceUrl )
164164
@@ -327,7 +327,7 @@ class LDP {
327327 } catch ( err ) { }
328328 }
329329
330- // check if a document (or container) has the same name than a document (or container)
330+ // check whether a document (or container) has the same name as another document (or container)
331331 async checkItemName ( url ) {
332332 let testName , testPath
333333 const { hostname, pathname } = this . resourceMapper . _parseUrl ( url ) // (url.url || url)
@@ -585,13 +585,13 @@ class LDP {
585585
586586 let itemName = slug . endsWith ( extension ) || slug . endsWith ( this . suffixAcl ) || slug . endsWith ( this . suffixMeta ) ? slug : slug + extension
587587 try {
588- // check resource exists
588+ // check whether resource exists
589589 const context = container ? '/' : ''
590590 await this . resourceMapper . mapUrlToFile ( { url : ( requestUrl + itemName + context ) } )
591591 itemName = `${ uuid . v1 ( ) } -${ itemName } `
592592 } catch ( e ) {
593593 try {
594- // check resource with same name exists
594+ // check whether resource with same name exists
595595 const context = ! container ? '/' : ''
596596 await this . resourceMapper . mapUrlToFile ( { url : ( requestUrl + itemName + context ) } )
597597 itemName = `${ uuid . v1 ( ) } -${ itemName } `
0 commit comments