Skip to content

Instantly share code, notes, and snippets.

View josiahwiebe's full-sized avatar

Josiah Wiebe josiahwiebe

View GitHub Profile
@josiahwiebe
josiahwiebe / api.js
Created February 9, 2018 15:50
Polka NextJS + API Example
const polka = require('polka')
module.exports = polka()
.get('/', (req, res) => {
res.end('this is the api')
})
@josiahwiebe
josiahwiebe / provinces_array.json
Last active November 8, 2019 15:47
JSON arrays of USA states and Canadian provinces, separated by country, combined and sorted, and combined and separated
[
"Alberta",
"British Columbia",
"Manitoba",
"New Brunswick",
"Newfoundland and Labrador",
"Northwest Territories",
"Nova Scotia",
"Nunavut",
"Ontario",
@josiahwiebe
josiahwiebe / validateVin.js
Created May 8, 2020 16:29
Validate VIN function
export const validateVin = value => {
if (value.length !== 17) return false
let chars = 'ABCDEFGHJKLMNPRSTUVWXYZ0123456789'
let nValue = new Array(
1,
2,
3,
4,
5,