@vercel/routing-utils
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.2 • Public • Published

    @vercel/routing-utils

    Route validation utilities

    Usage

    yarn add @vercel/routing-utils

    import { normalizeRoutes } from '@vercel/routing-utils';
    
    const { routes, error } = normalizeRoutes(inputRoutes);
    
    if (error) {
      console.log(error.code, error.message);
    }
    import { routesSchema } from '@vercel/routing-utils';
    
    const ajv = new Ajv();
    const validate = ajv.compile(routesSchema);
    const valid = validate([{ src: '/about', dest: '/about.html' }]);
    
    if (!valid) console.log(validate.errors);

    Keywords

    none

    Install

    npm i @vercel/routing-utils

    DownloadsWeekly Downloads

    78,072

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    87.5 kB

    Total Files

    15

    Last publish

    Collaborators

    • kit-foster
    • hellojennifertran
    • aidenschrock
    • wepanicinapew
    • maxleiter
    • sr_intern
    • chris-olszewski
    • wbinnssmith
    • calebboyd
    • gargis5
    • dummdidumm
    • adriancooney_vercel
    • brookemosby
    • amyegan
    • onebutter
    • henryheffernan
    • alexkirsz
    • bvred4244
    • jridgewell
    • cb1kenobi
    • jasonwiker
    • sebastianroming
    • anthonyshew
    • okikio
    • broooooklyn
    • ypessoa
    • zlw241
    • nalalami
    • mbrakken
    • wyattjoh
    • pearlbea
    • gt-codes
    • sowsut
    • jennifer_stern
    • matthewstanciu
    • hannesborno
    • ethomson
    • lubakravche
    • kaiyuhsu
    • aaronbrown-vercel
    • denizkusef
    • reconbot
    • javierbyte
    • kayernyc
    • janory
    • codyogden
    • dcartertwo
    • feedthejim
    • tilly3g
    • pointemama
    • wits
    • megbird
    • feugy
    • dizzyup
    • edgarcerecerezv
    • livcarman
    • segunadebayo
    • sambecker
    • craigandrews
    • mjakobis
    • chloe.tedder
    • kale-stew
    • pbto
    • daniel.campbell
    • arian-vercel
    • nuta
    • almonk
    • samselikoff
    • baruchadi
    • ejc
    • aaorris
    • doque
    • ryanto
    • nathanhammond
    • snokohn
    • johnphamous
    • tknickman
    • agadzik
    • gbibeaulaviolette
    • thomcrowe
    • emeraldsanto
    • ecklf
    • timeyoutakeit
    • cramforce
    • balazs4
    • casey.gowrie
    • samuel.foster
    • swarnavasengupta
    • lydiahallie
    • ethan_arrowood
    • mitchellwright
    • kwonoj
    • kakadiadarpan
    • endangeredmassa
    • nick.tracey
    • crowterli
    • gsoltis
    • schlez
    • epallerols
    • domysee
    • nwienert
    • arbw
    • gudmundur
    • marcgreenstock
    • stephdietz
    • vvo
    • falcoagustin
    • nabsul
    • bmealey
    • brethudson
    • maedahbatool
    • matt.straka
    • jasongullickson
    • f3d0r
    • gaspar09
    • jtaylor0196
    • pieparker
    • kelly
    • dferber90
    • healeycodes
    • broph123
    • codybrouwers
    • ebb-tide
    • gdborton
    • msimulcik
    • jeffreyarneson
    • jaredpalmer
    • kikobeats
    • domeccleston
    • nutlope
    • hungrybearstudio
    • codetaromiura
    • mattcleg
    • gkaragkiaouris
    • geovanisouza92
    • dglsparsons
    • lostinpatterns
    • pralhad-vercel
    • vercel-release-bot
    • williamli
    • southpolesteve
    • goncy
    • chibicode
    • ijjk
    • andybitz
    • iamevilrabbit
    • tootallnate
    • styfle
    • zeit-bot
    • quietshu
    • hankvercel
    • mglagola
    • javivelasco
    • timer
    • lucleray
    • leerobinson
    • matheuss
    • nkzawa
    • anatrajkovska
    • timneutkens
    • elsigh
    • cl3arglass
    • samsisle
    • chriswdmr
    • rizbizkits
    • ernestd
    • ismaelrumzan
    • jhoch
    • mrmckeb
    • kuvos
    • creationix
    • rauchg
    • huozhi
    • cmvnk
    • lfades
    • paulogdm
    • ktcarter
    • okbel
    • padmaia
    • msweeneydev
    • delba
    • catsaremlg
    • steventey
    • sokra
    • gsandhu
    • dbredvick
    • kdy1