Steps:
- Download and install VirtualBox: https://www.virtualbox.org/
- Download Ubuntu ISO image: https://ubuntu.com/download/desktop
- Setup new Ubuntu x64 virtual machine, with
- at least 2 cores
- at least 20GB of storage
- the VMSVGA Graphics Controller
| const array = []; | |
| const uniqueArray = array.filter((value, index, values) => { | |
| return values.indexOf(value) === index; | |
| }); |
| /** | |
| * Group array by item into object | |
| * | |
| * Polyfill for <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/groupBy> | |
| * Inspired by <https://stackoverflow.com/questions/14446511/most-efficient-method-to-groupby-on-an-array-of-objects#answer-64489535> | |
| */ | |
| export const groupBy = <T>(array: Array<T>, predicate: (value: T, index: number, array: Array<T>) => string) => | |
| array.reduce( | |
| (acc, value, index, array) => { | |
| (acc[predicate(value, index, array)] ||= []).push(value); |
| /** | |
| * Sort one value to the top | |
| */ | |
| export const sortToTop = <T>(list: Array<T>, matchFn: (item: T) => boolean): Array<T> => { | |
| return list.toSorted((listItemA, listItemB) => { | |
| return matchFn(listItemA) ? -1 : matchFn(listItemB) ? 0 : 1; | |
| }); | |
| }; |
| <script lang="ts" setup> | |
| /** | |
| * Icon Component | |
| * | |
| * Inspired by <https://github.com/gitFoxCode/nuxt-icons/blob/d7e4e5b0f59c923fe97c7b9eebd5b94be0650180/src/runtime/components/nuxt-icon.vue> | |
| */ | |
| // Props | |
| const props = defineProps({ | |
| name: { |
Steps:
| { | |
| "moduleNameMapper": { | |
| "^d3-([a-z-]*)$": "d3-$1/dist/d3-$1", | |
| "^lodash-es$": "lodash" | |
| } | |
| } |
| import { combineLatest, map, Observable, timer } from 'rxjs'; | |
| /** | |
| * Delay at least (RxJS operator) | |
| * | |
| * @param delayInMs Delay in ms | |
| */ | |
| export const delayAtLeast = <T>(delayInMs: number) => { | |
| return (observable: Observable<T>) => { | |
| return combineLatest([timer(delayInMs), observable]).pipe( |
| { | |
| // Support for native ESM (official) | |
| // See <https://nodejs.org/api/packages.html#packages_type> | |
| "type": "module", | |
| // Export map (official) | |
| // See <https://nodejs.org/api/packages.html#packages_subpath_exports> | |
| "exports": { | |
| ".": { |