moment-logger
v1.0.5-12
Published
Logging with timestamps
Downloads
276
Maintainers
Readme
Moment Logger
Fancy terminal logging with timestamps
Installing
Using npm:
$ npm install moment-logger
Using yarn:
$ yarn add moment-logger
Example
CommonJS Usage
In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with require() use the following approach:
const logger = require('moment-logger').default;
# Display hello world
logger.log('Hello world');
# Display world object
const worldObject = {
earth: ['Water', 'Earth', 'Air', 'Fire']
};
logger.log(worldObject);
ES6 Usage
import logger from 'moment-logger';
# Display hello world
logger.log('Hello world');
# Display world object
const worldObject = {
earth: ['Water', 'Earth', 'Air', 'Fire']
};
logger.log(worldObject);