// big text can be correctly indented in table layout
constlamu=require('lamu')()
lamu.log({label:'info', text:'hello world'})
lamu.log({label:'success', text:`Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.`})
lamu.log({label:'warning', text:'goodbye world'})
// node examples/big
Extra line-spacing
// more eye-friendly
constlamu=require('lamu')({
lineSpacing:1
})
lamu.log({label:'info', text:'hello world'})
lamu.log({label:'success', text:`Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.`})
lamu.log({label:'warning', text:'goodbye world'})
// node examples/line-spacing
Custom separator
// use ==> instead of :: as separator
constlamu=require('lamu')({
lineSpacing:1,
separator:'==>'
})
lamu.log({label:'info', text:'hello world'})
lamu.log({label:'success', text:`Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.`})
lamu.log({label:'warning', text:'goodbye world'})
// node examples/separator
Update exising log
constlamu=require('lamu')({
lineSpacing:1
})
lamu.log({label:'info', text:'hello world'})
constlog=lamu.log({
label:'download',
text:`please wait...`,
color:'yellow'}
)
lamu.log({label:'warning', text:'goodbye world'})
setTimeout(()=>{
lamu.update(log,{text:'done!', color:'green'})
},1000)
API
Lamu({lineSpacing = 0, separator = '::'})
lineSpacing
Type: number
Default: 0
Extra line-spacing.
separator
Type: string
Default: "::"
Use a custom separator.
lamu.log({label, color, text})
Log the logs to console, returns the id of least recently added log.
label
Type: string
The label of the log, you can use some built-in label like successerrorwarninginfo with preset colors.