This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useNuxtApp } from '#app' | |
import { sendRedirect } from 'h3' | |
/** | |
* Performs an external redirect in a Nuxt3 route middleware. Once this Nuxt3 | |
* pull request is merged, this function can be removed in favor of navigateTo: | |
* | |
* https://github.com/nuxt/framework/pull/5022 | |
* | |
* @param url - An external url to redirect to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |