Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
WIKIPEDIA
/
nodejs
/
daily_store_reports_nodejs
/
node_modules
/
logform
/
examples
:
volume.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
const { format } = require('../'); const volume = format((info, opts) => { if (opts.yell) { info.message = info.message.toUpperCase(); } else if (opts.whisper) { info.message = info.message.toLowerCase(); } return info; }); // `volume` is now a function that returns instances of the format. const scream = volume({ yell: true }); console.dir(scream.transform({ level: 'info', message: `sorry for making you YELL in your head!` }, scream.options)); // `volume` can be used multiple times to create different formats. const whisper = volume({ whisper: true }); console.dir(whisper.transform({ level: 'info', message: `WHY ARE THEY MAKING US YELL SO MUCH!` }, whisper.options));