1.0.1 • Published 7 years ago

sg-guard v1.0.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

sg-guard

Build Status npm Version JS Standard

Simple quick auth

Installation

$ npm install sg-guard --save

Usage

'use strict'

const sgGuard = require('sg-guard')

{
  const ThePassword = 'BigBigApple'

  let guard = sgGuard(ThePassword)

  // Ask use to input password
  let ok = guard.ask()
  if (!ok) {
    throw new Error('Auth failed!')
  }
}

License

This software is released under the Apache-2.0 License.

Links