View finished result here / Fork this Codepen to get started
Create a coverage report to see which code was downloaded, and which code was actually used for a given entry point of your app.
Download the report and put it in the top level directory of your project. Make sure it's named coverage.json
.
Create this file in the top level directory of your project:
build-bundles.js
[ | |
{ | |
"url": "https://www.reddit.com/", | |
"ranges": [ | |
{ "start": 0, "end": 99 }, | |
{ "start": 447, "end": 629 }, | |
{ "start": 655, "end": 1210 }, | |
{ "start": 1221, "end": 1494 }, | |
{ "start": 1505, "end": 1507 } | |
], |
import { useRef } from "react"; | |
import cloneDeep from "lodash.clonedeep"; | |
import isEqual from "lodash.isequal"; | |
const useDeepEqualCallback = (callback: any, deps: any[]) => { | |
const callbackRef = useRef(callback); | |
const cachedDeps = useRef(cloneDeep(deps)); | |
if (!isEqual(deps, cachedDeps.current)) { | |
callbackRef.current = callback; | |
cachedDeps.current = cloneDeep(deps); |
export type FetchConfig = RequestInit & { | |
postman?: boolean; | |
method?: keyof typeof HTTPMethods; | |
body?: any; | |
root: string; | |
path?: string; | |
params?: Record<string, any>; | |
}; | |
export interface Global { |
Use a password manager and use different, complex passwords for every site. (The password manager will make it easy to generate and save new, secure passwords.) The one I use is OnePassword (paid plan).
##D3 Calendar Day View Layout
This script demonstrates a layout algorithm I developed for a day calendar view. The height and y-axis placement of each calendar item are solely determined by its start and end times, but the width and x-axis placement of each item is dependent on how many other items occur during the same time as it.
You can change the layout by adding items using the form to the left, or clicking on items to remove them.
###There are three main steps for the layout calculation: