Documentation Tutorials

Helpers

import {
  helpers
} from 'js-web'

Helper functions:

// console.log(helpers)
{
  hash: [AsyncFunction: hash],
  compareHash: [AsyncFunction: compareHash]
}

Using the hash functions:

const helpers = helpers
const password = 'mypw'
const hash = await helpers.hash(password)
if(await helpers.compareHash('mypw',hash)){
  return redirect('/admin')
}
return back()