How to use the cookies.get function in cookies

To help you get started, we’ve selected a few cookies 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 snphq / generator-sp / generators / app / templates / app / scripts / app.js View on Github external
$(document).ajaxSend((event, jqxhr, settings) => {
  if (settings.type !== 'GET') {
    return jqxhr.setRequestHeader('X-CSRF-Token', cookies.get('CSRF-Token'));
  }
});
github dapetcu21 / ARGOTabs / client / core / uicontroller.js View on Github external
loadSession (onFail = (function () {}), onOpen = (function () {})) {
    let lastURL = Cookies.get('ARGOTabs_lastURL')
    const locationURL = window.location.href.match(/^[^#]*#\/url\/([^#]*)#?(.*)$/)

    if (locationURL) {
      lastURL = decodeURIComponent(locationURL[1])
      window.history.replaceState(null, '', '/#' + locationURL[2])
    }

    try {
      if (!lastURL) {
        throw new Error('No session to resume')
      }

      const source = Backend.load(lastURL)

      if (!source.exists()) {
        throw new Error('Entry for ' + lastURL + 'does not exist')
github 2600hz / monster-ui / src / js / lib / monster.js View on Github external
has: function has(key) {
				return Cookies.get(key) === undefined ? false : true;
			}
		},
github 2600hz / monster-ui / src / js / lib / monster.js View on Github external
get: function get(key) {
				return this.has(key) ? Cookies.get(key) : null;
			},