##a minimal lightweight console.log() alias for those who prefer to write this feature in their preferred language of choice (print, printf, echo...)
-
npm i console.log-alias --save
-
load the package:
const print = require('console.log-alias');
-
now you can write print() instead of console.log()
print('hi');
// hi
- Clone this repository or download this .zip
- Copy "index.js" to the root of your project folder, you can rename the file if you want.
- load the package in your js file, this time by referencing the downloaded file:
- don't forget the dot and forward slash before the file-name ./
const print = require('./index.js);
- By changing the name of the require variable, you can pretty much assign any name to the console.log function:
const print = require('console.log-alias')
const println = require('console.log-alias')
const printf = require('console.log-alias')
const cout = require('console.log-alias')
const WriteLine = require('console.log-alias')
const echo = require('console.log-alias')
const puts = require('console.log-alias')
const Println = require('console.log-alias')
const cat = require('console.log-alias')
const disp = require('console.log-alias')
const WriteLn = require('console.log-alias')
const DISPLAY = require('console.log-alias')
const write = require('console.log-alias')
const NSLog = require('console.log-alias')
const say = require('console.log-alias')
const MsgBox = require('console.log-alias')
const PRINT = require('console.log-alias')
const log = require('console.log-alias')
const l = require('console.log-alias')
const echo = require('console.log-alias');
echo('hi');
MIT
Enjoy!