consome
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,2 +0,2 @@ | ||
require('../index'); | ||
require('consome'); | ||
@@ -3,0 +3,0 @@ function Loader() { |
{ | ||
"name": "consome", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "add a console.logAt function to your NodeJS console", | ||
"main": "index.js", | ||
"author": "siffogh", | ||
"license": "MIT" | ||
"license": "Apache License Version 2.0", | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"consome": "^1.0.0" | ||
}, | ||
"repository": "https://github.com/siffogh/consome" | ||
} |
# Consome = Console + Awesome :raised_hands: | ||
Add a logAt(index, message) function to your NodeJS console. | ||
<img src="./snippet.png" height="500px" /> | ||
Add a logAt(index, message) function to your NodeJS console. | ||
## Install | ||
@@ -19,3 +17,28 @@ | ||
## Result | ||
## Basic Usage | ||
```js | ||
require('consome'); | ||
console.logAt(0, 'logging something at line 0'); | ||
console.logAt(2, 'logging something at line 2'); | ||
``` | ||
## Demo | ||
Let's implement a dynamic terminal loader: | ||
```js | ||
require('consome'); | ||
console.log('----- Demo -----'); | ||
const loadingLine = console.log('Loading'); | ||
setInterval(() => { | ||
console.logAt(loadingLine, `Loading ${loader.next()}`) | ||
}, 500); | ||
console.log('----- Fin -----'); | ||
``` | ||
### Result | ||
<img src="./demo.gif" height="200px" /> | ||
## License | ||
Unless otherwise specified this project is licensed under [Apache License Version 2.0](./LICENSE). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
44
100562
1