moment-logger
TypeScript icon, indicating that this package has built-in type declarations

1.0.5-12 • Public • Published

Node.js Package

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);

Package Sidebar

Install

npm i moment-logger

Weekly Downloads

26

Version

1.0.5-12

License

MIT

Unpacked Size

52 kB

Total Files

24

Last publish

Collaborators

  • boxpositron