tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

evaluation-result.js (499B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
      4 
      5 function isFront(result) {
      6  return !!result && typeof result === "object" && !!result.getGrip;
      7 }
      8 
      9 export function getGrip(result) {
     10  if (isFront(result)) {
     11    return result.getGrip();
     12  }
     13 
     14  return result;
     15 }
     16 
     17 export function getFront(result) {
     18  return isFront(result) ? result : null;
     19 }