egg-msg-flash-jklen

[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down

Usage no npm install needed!

<script type="module">
  import eggMsgFlashJklen from 'https://cdn.skypack.dev/egg-msg-flash-jklen';
</script>

README

egg-msg-flash

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-msg-flash --save

Usage


ctx.flash = {
  type: 'success',
  message: {
    some: 'one'
  }
}

// or

ctx.flash_success({ some: 'one' })

ctx.flash_error()
ctx.flash_info()
ctx.flash_warning()

ctx.request.flash(type, message)

// get flash by
ctx.flash

see config/config.default.js for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT