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
A0cJJwAgpaC6pBTSLFVukapdSoFhKB2TyjIlPSOVaShcQ9I2UPmGxDildA5E61AUB5WihVJ6CIKJKKqLkmyE0kepMlKqOqnETKh0U4qdqPqp0lBJHUVRWgpVT4mpwFVK2qoUlK9KIcYqBamzSqHWKgXJW1DFXVClveIvigyWwGHIYlQeQzEZpMuKzaR8psRopTqtqtVKQfQaVDVbxW0J7ab4TTKcUh1XCsJyxHOkplNdB2W7RN+hYjwInZeg9ZRiP6V0uoAIFDniEKEDIshmyPcJiIxB3JlwkX2+ZffwHSQ1HhmI9iF/DGYCIvt8y+7hdZARTRmPrCy7RnA+1PfwcCtcPLIro0hAZAzizoSLxyOWMUPQCYgcZfmmODSNLBMuQvvHwC/EElQcOlzkGx9CYHbfNEbBDGYisrlxxNGB/42lPwiKJag4gkFnwrMbUCNIgx8ugmCu8GNHn0Rq3M2NK3xEU8YjWPJtbAuYhSEoQY5sCwCIcMpdFWtk5oSLlOjABqOOIgEREr6LWMKzG0DCRbjw7AaMLh75PkXcKecERKCfth9UCGFHBGF8yGI0FS4e4RSBDsGoo0hAhIRnI5bwbIQLz8bjkaIqh9ABEaDsEMb4EAjKOPpmSKPKIRFw61ed0rrUiIzxB2791qdf10g9vtlG2gvAbV51SutSIzLGX3sBuM3T61bI13VwkeqUViwTHn1oo8ohkfYCcJtXndK61IiM8ddeAG7z9B2V8ajUCO5oDmFH3qhySKS9ANwGt8KCV53SutSIjPHXXgBug1thwWM8NtJrGlUOiYBb45deH7zqlNalRmSMP3Br/NLrg6endpSnXyEhIy1M0+hGlUMi4Nb4pdcHrzqldakRGeMP3Bq/9Prg6TvK9um7baRVNN3C3JWJtBeA27zqlNalRmSMv/YCcJu3wq2PAUmN4CrlWIKK06hySATc+lWntC41ImP8gVs/PeXpOypcZEMpM5vcP98LI+0F4Db4pdcHrzqldakRGeOvvQDcBr/0+uDp4TrI |
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
<template> | |
<nav> | |
<v-navigation-drawer | |
v-model="drawer" | |
bottom | |
clipped | |
app | |
></v-navigation-drawer> | |
<v-toolbar dark app> | |
<v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon> |
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
<template> | |
<nav> | |
<v-toolbar dark app> | |
<v-app-bar-nav-icon @click="drawer = !drawer"></v-app-bar-nav-icon> | |
<v-toolbar-title class="text-uppercase font-weight-thin">Beenerds <span class="font-weight-bold">Guild</span></v-toolbar-title> | |
<v-spacer></v-spacer> | |
<v-btn fab x-small class="cyan mr-5" darken-1> | |
<v-icon>mdi-bell</v-icon> | |
</v-btn> | |
<v-avatar |
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
(function(){ | |
const libraryStorage = {} | |
function librarySystem(libraryName, array, callback) { | |
if (arguments.length > 1) { | |
if (array.length > 0) { | |
let libraryDepedencies = array.map(function(arg) { | |
return libraryStorage[arg]; | |
}) | |
libraryStorage[libraryName] = callback.apply(null, libraryDepedencies); |
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
// Naive solution #Solution 1 | |
// Created a new function and run it each time a user change the list. so the local storage is updated synchronize with render(); | |
/*global jQuery, Handlebars, Router */ | |
jQuery(function ($) { | |
'use strict'; // Why this = document ? | |
Handlebars.registerHelper('eq', function (a, b, options) { | |
return a === b ? options.fn(this) : options.inverse(this); // Case 4 | |
}); |
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
function runWithDebugger(func, array) { | |
if (arguments.length > 1) { // Array is passed as second argument | |
debugger; | |
func.apply(null, array); | |
// func(...array); // es6 way | |
} else { // Optional array is not passed. | |
debugger; | |
func(); | |
} |
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
/** | |
* CASE-1: Valid string contains %v -> return an object. | |
* checkCurrencyFormat('%v') -> { pos: '%v', neg: '-%v', zero: '%v'} | |
* | |
* CASE-2: Invalid string -> return defaults object/convert it. | |
* checkCurrencyFormat('%s') -> If its the first time that runs it will replace defaults lib.settings.currency.format | |
* from string '%s%v' to an object { pos: '%s%v', neg: '%s-%v', zero: '%s%v'} and return it. | |
* | |
* Case-3: Valid object -> Return the object without mutating it | |
* checkCurrencyFormat( {pos: '%v'} ) -> { pos: '%v' } |
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
DIV-1: { | |
P-1: | |
P-2: | |
DIV-2: { | |
DIV-1: | |
DIV-2 | |
} | |
DIV-3: { | |
DIV-1: { |
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
function loopObj(obj, valueToFind) { | |
for (let prop in obj) { | |
// Base Case: | |
if (obj[prop] === valueToFind) { | |
return obj[prop]; | |
} | |
// Recursive Case: | |
if (typeof obj[prop] === 'object') { | |
return loopObj(obj[prop], valueToFind); | |
} |
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
function checkCurrencyFormat(format) { | |
var defaults = lib.settings.currency.format; | |
// Allow function as format parameter (should return string or object): | |
if ( typeof format === "function" ) format = format(); | |
// Format can be a string, in which case `value` ("%v") must be present: | |
if ( isString( format ) && format.match("%v") ) { | |
// Create and return positive, negative and zero formats: |
NewerOlder