mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 12:57:47 +00:00
* Add API for frameworks and examples * Adjust headers * Update frameworks list * Always use latest * Add types * Use now repo for downloading and listing * Use .existsSync * Remove unused packages * Use 307 for redirect * Add examples * Update tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Make examples unique * Remove detectors from frameworks API * Use /api instead of Next.js * Install dependencies * Rename project * Change name * Empty * Change name * Update api/tsconfig.json Co-Authored-By: Steven <steven@ceriously.com> * Update examples Co-authored-by: Steven <steven@ceriously.com>
22 lines
465 B
JavaScript
22 lines
465 B
JavaScript
// Mock Browser API's which are not supported by JSDOM, e.g. ServiceWorker, LocalStorage
|
|
/**
|
|
* An example how to mock localStorage is given below 👇
|
|
*/
|
|
|
|
/*
|
|
// Mocks localStorage
|
|
const localStorageMock = (function() {
|
|
let store = {};
|
|
|
|
return {
|
|
getItem: (key) => store[key] || null,
|
|
setItem: (key, value) => store[key] = value.toString(),
|
|
clear: () => store = {}
|
|
};
|
|
|
|
})();
|
|
|
|
Object.defineProperty(window, 'localStorage', {
|
|
value: localStorageMock
|
|
}); */
|