source: imaps-frontend/node_modules/relateurl/lib/parse/hrefInfo.js@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 759 bytes
Line 
1"use strict";
2
3function hrefInfo(urlObj)
4{
5 var minimumPathOnly = (!urlObj.scheme && !urlObj.auth && !urlObj.host.full && !urlObj.port);
6 var minimumResourceOnly = (minimumPathOnly && !urlObj.path.absolute.string);
7 var minimumQueryOnly = (minimumResourceOnly && !urlObj.resource);
8 var minimumHashOnly = (minimumQueryOnly && !urlObj.query.string.full.length);
9 var empty = (minimumHashOnly && !urlObj.hash);
10
11 urlObj.extra.hrefInfo.minimumPathOnly = minimumPathOnly;
12 urlObj.extra.hrefInfo.minimumResourceOnly = minimumResourceOnly;
13 urlObj.extra.hrefInfo.minimumQueryOnly = minimumQueryOnly;
14 urlObj.extra.hrefInfo.minimumHashOnly = minimumHashOnly;
15 urlObj.extra.hrefInfo.empty = empty;
16}
17
18
19
20module.exports = hrefInfo;
Note: See TracBrowser for help on using the repository browser.