Package Exports
- fail-whale
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (fail-whale) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
fail-whale
▄████████████▄▐█▄▄▄▄█▌
█████▌▄▌▄▐▐▌██▌▀▀██▀▀
███▄█▌▄▌▄▐▐▌▀██▄▄█▌
▄▄▄▄█████████████Easily print a fail whale
import { failWhale } from 'fail-whale';
// When something bad happens
failWhale("Something went wrong :(")
/*
Prints to console.error:
▄████████████▄▐█▄▄▄▄█▌
█████▌▄▌▄▐▐▌██▌▀▀██▀▀
███▄█▌▄▌▄▐▐▌▀██▄▄█▌
▄▄▄▄█████████████
Something went wrong :(
*/Inject your own logger (override default console.error)
const logWarn = {
error: (msg: any) => console.warn(msg)
}
failWhale("Warn you instead", logWarn)
/*
Prints to console.warn:
▄████████████▄▐█▄▄▄▄█▌
█████▌▄▌▄▐▐▌██▌▀▀██▀▀
███▄█▌▄▌▄▐▐▌▀██▄▄█▌
▄▄▄▄█████████████
Warn you instead
*/