This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Storage { | |
get(item) { | |
const request = new Promise((resolve, reject) => { | |
let data = localStorage.getItem(item); | |
console.log(`Start of promise`); | |
(data) ? resolve(data) : reject(); | |
}); | |
request.then((data) => { | |
console.log(`promise resolved`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let total = 0, amount, item; | |
for (item in localStorage) { | |
amount = ((localStorage[item].length + item.length) * 2); | |
total += amount; | |
} | |
console.log(`Total = ${(total / 1024).toFixed(2)}KB`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Event { | |
constructor() { | |
this.events = {}; | |
} | |
fire(event, data) { | |
const Event = this.events[event]; | |
if( Event ) { | |
Event.forEach(callback => { | |
callback.call(null, data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"preset": "psr12", | |
"rules": { | |
"align_multiline_comment": true, | |
"array_indentation": true, | |
"array_syntax": true, | |
"blank_line_after_namespace": true, | |
"blank_line_after_opening_tag": true, | |
"combine_consecutive_issets": true, | |
"combine_consecutive_unsets": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----- BEGIN LICENSE ----- | |
Member J2TeaM | |
Single User License | |
EA7E-1011316 | |
D7DA350E 1B8B0760 972F8B60 F3E64036 | |
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD | |
FA0A2ABE 25F65BD8 D51458E5 3923CE80 | |
87428428 79079A01 AA69F319 A1AF29A4 | |
A684C2DC 0B1583D4 19CBD290 217618CD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Merge; | |
class Marge | |
{ | |
protected $data = []; | |
public function setData($data) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Collection::macro('maxBy', function ($callback) { | |
$callback = $this->valueRetriever($callback); | |
return $this->reduce(function ($result, $item) use ($callback) { | |
if ($result === null) { | |
return $item; | |
} | |
return $callback($item) > $callback($result) ? $item : $result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* purgecss start ignore */ | |
@tailwind base; | |
@tailwind components; | |
/* purgecss end ignore */ | |
/* | |
... | |
... | |
...other css | |
... |