How to use the sort function from tough-cookie

Find comprehensive JavaScript tough-cookie.sort code examples handpicked from public code repositorys.

95
96
97
98
99
100
101
102
103
104

For use with `.sort()`, sorts a list of cookies into the recommended order given in the RFC (Section 5.4 step 2).  Longest `.path`s go first, then sorted oldest to youngest.

``` javascript
var cookies = [ /* unsorted array of Cookie objects */ ];
cookies = cookies.sort(cookieCompare);
```

permuteDomain(domain)
---------------------
fork icon138
star icon1
watch icon2

+ 2 other calls in file