This file contains hidden or 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
| const dataMap = (data, valueArgs) => { | |
| return data | |
| .map( (obj) => ({ | |
| date: new Date(obj.date), | |
| manual: true, | |
| ...valueArgs.reduce((prev, curr, index) => ({ | |
| ...prev, | |
| [curr.name]: curr.split | |
| ? Number(obj.value.split("/")[index]) | |
| : Number(obj.value), |
This file contains hidden or 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
| // Lodash Diff comparison from a couple years ago | |
| getDiff() { | |
| const changes = (object, base) => { | |
| let arrayIndexCounter = 0; | |
| return _.transform(object, function (result, value, key) { | |
| if (!_.isEqual(value, base[key])) { | |
| let resultKey = _.isArray(base) ? arrayIndexCounter++ : key; | |
| result[resultKey] = (_.isObject(value) && _.isObject(base[key])) ? changes(value, base[key]) : value; | |
| console.log("Result: " + JSON.stringify(result)); | |
| } |
This file contains hidden or 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
| const resolve = (path, obj) => path.split(".").reduce((prev, curr) => prev ? prev[curr] : null, obj || self); |
This file contains hidden or 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
| local _, core = ...; | |
| local _G = _G; | |
| local L = core.L; | |
| local Util = core.Util; | |
| local PDKP = core.PDKP; | |
| local Defaults = core.defaults; | |
| -- WoW Classic Alliance Classes | |
| local classes = { |
This file contains hidden or 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
| {{value | naturalType}} |
This file contains hidden or 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
| @Pipe({name: 'debounce', pure: false}) | |
| export class DebouncePipe { | |
| private currentValue: any = null; | |
| private transformValue: any = null; | |
| private timeoutHandle: number = -1; | |
| constructor( | |
| private changeDetector: ChangeDetectorRef, | |
| private zone: NgZone, | |
| ) { | |
| } |
This file contains hidden or 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
| import { Pipe, PipeTransform } from '@angular/core'; | |
| @Pipe({name: 'default', pure: true}) | |
| export class DefaultPipe implements PipeTransform { | |
| transform(value: any, defaultValue: any): any { | |
| return value || defaultValue; | |
| } | |
| } |
This file contains hidden or 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
| @mixin pushFromBottom() { | |
| overflow: auto; | |
| display: flex; | |
| flex-direction: column-reverse; | |
| } | |
| ... | |
| .push-from-bottom-container { | |
| @include pushFromBottom(); | |
| } |
This file contains hidden or 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
| @mixin scrollInText() { | |
| overflow: initial !important; | |
| } |
This file contains hidden or 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
| @mixin aspectRatio($ratio: '1:1', $width: 100%) { | |
| width: $width; | |
| @if($ratio == '1:1') { | |
| padding-top: 100%; /* 1:1 Aspect Ratio */ | |
| } | |
| @else if($ratio == '16:9') { | |
| padding-top: 56.25%; /* 16:9 Aspect Ratio */ | |
| } | |
| @else if($ratio == '4:3') { | |
| padding-top: 75%; /* 4:3 Aspect Ratio */ |
NewerOlder