main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
759 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | function 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 |
|
---|
| 20 | module.exports = hrefInfo;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.