Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class LightJs {
- constructor(){
- this.shouldDebug = true;
- this.q = this.query;
- this.qAll = this.queryAll;
- }
- query(selector){
- return document.querySelector(selector);
- }
- queryAll(selector){
- return document.querySelectorAll(selector);
- }
- log(data){
- console.log(`%c Info: ${data}`, 'background: #222; color: #bada55' );
- }
- debug(data){
- if(this.shouldDebug){
- console.log(`%c Debug: ${data} `, 'background: #222; color: cyan' );
- if(typeof({}) == typeof(data) && data.length == null){
- console.log(data);
- }
- }
- }
- }
- class Light {
- static js(){
- return new LightJs(arguments);
- }
- }
- const l = Light.js();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement