How to use the abab.btoa function in abab

To help you get started, we’ve selected a few abab examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github withspectrum / spectrum / shared / graphql / queries / directMessageThread / getDirectMessageThreadMessageConnection.js View on Github external
} else if (existingMessage) {
            return prev;
          }

          // Add the new message to the data
          return Object.assign({}, prev, {
            ...prev,
            directMessageThread: {
              ...prev.directMessageThread,
              messageConnection: {
                ...prev.directMessageThread.messageConnection,
                edges: [
                  ...prev.directMessageThread.messageConnection.edges,
                  {
                    node: newMessage,
                    cursor: btoa(newMessage.id),
                    __typename: 'DirectMessageEdge',
                  },
                ],
              },
            },
          });
        },
      });
github elastic / kibana / x-pack / dev-tools / api_debug / request_from_api.js View on Github external
function getRequestParams(argv) {
  // use `--host=https://somedomain.com:5601` or else http://localhost:5601 is defaulted
  const host = argv.host || 'http://localhost:5601';
  // use `--auth=myuser:mypassword` or else elastic:changeme is defaulted
  // passing `--auth` with no value effectively sends no auth
  const auth = argv.auth || 'elastic:changeme';
  const authStr = abab.btoa(auth);
  // auto-add a leading slash to basePath
  const basePath = argv.basePath ? '/' + argv.basePath : '';

  return {
    host,
    auth: `Basic ${authStr}`,
    basePath,
  };
}
github GreenImp / rpg-dice-roller / spec / helpers / custom-matchers.helper.js View on Github external
isBase64Encoded(obj){
      try{
        return obj && (btoa(atob(obj)) === obj);
      }catch(e){
        return false;
      }
    }
  };
github withspectrum / spectrum / shared / graphql / mutations / message / sendDirectMessage.js View on Github external
edge => {
                if (edge.node.id === messageInStore.id)
                  return {
                    ...edge,
                    cursor: btoa(addMessage.id),
                    node: addMessage,
                  };
                return edge;
              }
            );
github sx1989827 / DOClever / node_modules / jsdom / lib / jsdom / browser / Window.js View on Github external
this.btoa = function (str) {
    const result = btoa(str);
    if (result === null) {
      throw new DOMException("The string to be encoded contains invalid characters.", "InvalidCharacterError");
    }
    return result;
  };
github jsdom / jsdom / lib / jsdom / browser / Window.js View on Github external
this.btoa = function (str) {
    const result = btoa(str);
    if (result === null) {
      throw new DOMException("The string to be encoded contains invalid characters.", "InvalidCharacterError");
    }
    return result;
  };
github flaviuse / mern-authentication / client / node_modules / jsdom / lib / jsdom / browser / Window.js View on Github external
this.btoa = function (str) {
    const result = btoa(str);
    if (result === null) {
      throw new DOMException("The string to be encoded contains invalid characters.", "InvalidCharacterError");
    }
    return result;
  };

abab

WHATWG spec-compliant implementations of window.atob and window.btoa.

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

58 / 100
Full package analysis

Popular abab functions