Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jacobbubu/debug-label
a information label on web pae
https://github.com/jacobbubu/debug-label
Last synced: 15 days ago
JSON representation
a information label on web pae
- Host: GitHub
- URL: https://github.com/jacobbubu/debug-label
- Owner: jacobbubu
- Created: 2015-02-11T07:42:09.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-28T06:30:00.000Z (almost 10 years ago)
- Last Synced: 2025-01-05T18:12:04.470Z (22 days ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# debug-label
This module provides a very simple debug label for your demos and prototypes up and running. Ideal for use with Beefy.
# Example
```js
var debugLabel = require('debug-label');
var label = debugLabel({
onResize: function(width, height) {
label.info(width, height);
}
});
```## apis
```js
label.log('plain text', Date.now());
label.debug('size', window.innerWidth, window.innerHeight);
label.info('size', window.innerWidth, window.innerHeight);
label.warn('size', window.innerWidth, window.innerHeight);
label.error('size', window.innerWidth, window.innerHeight);
```### change the styles
```js
label.style.right = 0;
label.cell.style.textAlign = 'right';
label2.cell.style.color = 'MistyRose';
```# play with beefy
Clone to your computer.
```
git clone https://github.com/jacobbubu/debug-label.git debug-label
cd debug-label
npm install
```And then:
```
npm start -- demo/demo.js
```And open up `localhost:9966` in your browser.
Also, you could try
```
npm start -- demo/multiLabelsWithStyles.js
```