chunk_id
stringlengths
36
36
source
stringclasses
35 values
source_url
stringlengths
0
290
upstream_license
stringclasses
1 value
document_id
stringlengths
36
36
chunk_index
int64
0
324k
retrieved_at
stringclasses
2 values
chunker_version
stringclasses
4 values
content_hash
stringlengths
15
64
content
stringlengths
50
44.7k
namespace
stringclasses
9 values
source_name
stringclasses
35 values
raw_text
stringlengths
50
44.7k
cleaned_text
stringlengths
50
44.7k
tags
stringclasses
49 values
collection_name
stringclasses
11 values
2894fd55-dd8a-4a2f-88bd-3f7237475762
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-interval.md
unknown
45530d49-dc47-4ff7-9f70-5e363f888cef
0
SemanticChunker@1.0.0
1c30b4eb34e0171abfbaf253abb1870575c5b999e8700bdf0a3b229ec5dfa420
--- title: React useInterval hook shortTitle: useInterval hook language: react tags: [hooks,effect] cover: clock excerpt: Wrapping your mind around React hooks and how they interact with `setInterval()` can be difficult. Here's a guide to get you started. listed: true dateModified: 2024-07-04 --- Wrapping your mind ar...
unknown
unknown
--- title: React useInterval hook shortTitle: useInterval hook language: react tags: [hooks,effect] cover: clock excerpt: Wrapping your mind around React hooks and how they interact with `setInterval()` can be difficult. Here's a guide to get you started. listed: true dateModified: 2024-07-04 --- Wrapping your mind ar...
--- title: React useInterval hook shortTitle: useInterval hook language: react tags: [hooks,effect] cover: clock excerpt: Wrapping your mind around React hooks and how they interact with `setInterval()` can be difficult. Here's a guide to get you started. listed: true dateModified: 2024-07-04 --- Wrapping your mind ar...
code_snippets
78ae3258-2ae8-4eca-b9cf-14caa19ddb43
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-interval.md
unknown
45530d49-dc47-4ff7-9f70-5e363f888cef
2
SemanticChunker@1.0.0
6afe766e0aeebaa88b07be00e343443f15b9db959e24c1ed65a234ff9ff09257
[Intervals as a side effect > The problem with closures] ## The problem with closures The closure inside `setInterval()` will only ever have access to whatever variables and values were available when it got instantiated. This means we have to be extra careful about its first argument to make sure that fresh values w...
unknown
unknown
[Intervals as a side effect > The problem with closures] ## The problem with closures The closure inside `setInterval()` will only ever have access to whatever variables and values were available when it got instantiated. This means we have to be extra careful about its first argument to make sure that fresh values w...
[Intervals as a side effect > The problem with closures] ## The problem with closures The closure inside `setInterval()` will only ever have access to whatever variables and values were available when it got instantiated. This means we have to be extra careful about its first argument to make sure that fresh values w...
code_snippets
9053c885-b9ed-4c17-9283-2e992566a832
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-interval.md
unknown
45530d49-dc47-4ff7-9f70-5e363f888cef
4
SemanticChunker@1.0.0
026d442c9b78f6d319f1fc1f798e0aab4038ce65914332c5d9a8187e0600854b
[Intervals as a side effect > Making it reusable] ## Making it reusable Finally, let's extract all of this into a **custom hook** to make it reusable. We can extract `callback` as an argument for the custom hook and use it as the sole dependency of an additional `useEffect()` hook that will update the ref for the cal...
unknown
unknown
[Intervals as a side effect > Making it reusable] ## Making it reusable Finally, let's extract all of this into a **custom hook** to make it reusable. We can extract `callback` as an argument for the custom hook and use it as the sole dependency of an additional `useEffect()` hook that will update the ref for the cal...
[Intervals as a side effect > Making it reusable] ## Making it reusable Finally, let's extract all of this into a **custom hook** to make it reusable. We can extract `callback` as an argument for the custom hook and use it as the sole dependency of an additional `useEffect()` hook that will update the ref for the cal...
code_snippets
a61d41a3-39a3-4377-9893-1e7c010eba30
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-interval.md
unknown
45530d49-dc47-4ff7-9f70-5e363f888cef
1
SemanticChunker@1.0.0
e87d4ee3756e11d0e7adb65d804f1b5b10f839183a89926b8a6289b2b8da5368
[Intervals as a side effect] ## Intervals as a side effect First, it should be clear that `setInterval()` is a side effect. After all, it's **not directly tied to a component's render method**. Therefore we should call it inside a `useEffect()` hook and use its `return` to call `clearInterval()` when unmounting. To a...
unknown
unknown
[Intervals as a side effect] ## Intervals as a side effect First, it should be clear that `setInterval()` is a side effect. After all, it's **not directly tied to a component's render method**. Therefore we should call it inside a `useEffect()` hook and use its `return` to call `clearInterval()` when unmounting. To a...
[Intervals as a side effect] ## Intervals as a side effect First, it should be clear that `setInterval()` is a side effect. After all, it's **not directly tied to a component's render method**. Therefore we should call it inside a `useEffect()` hook and use its `return` to call `clearInterval()` when unmounting. To a...
code_snippets
beee2164-befa-44ff-baef-7e4c762b74ae
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-interval.md
unknown
45530d49-dc47-4ff7-9f70-5e363f888cef
3
SemanticChunker@1.0.0
18de83a2ac22ee3afcf144002c44169fb6ba26676aa4c7bc2db082ca9acde779
[Intervals as a side effect > Updating the callback] ## Updating the callback Using the `useRef()` hook might have just shifted the problem. The value of the created ref now needs to be **refreshed** inside `setInterval()`. Luckily, this is an easy problem to solve. We could create a wrapper function that passes the ...
unknown
unknown
[Intervals as a side effect > Updating the callback] ## Updating the callback Using the `useRef()` hook might have just shifted the problem. The value of the created ref now needs to be **refreshed** inside `setInterval()`. Luckily, this is an easy problem to solve. We could create a wrapper function that passes the ...
[Intervals as a side effect > Updating the callback] ## Updating the callback Using the `useRef()` hook might have just shifted the problem. The value of the created ref now needs to be **refreshed** inside `setInterval()`. Luckily, this is an easy problem to solve. We could create a wrapper function that passes the ...
code_snippets
9d9083ae-1654-40ae-a2fa-92705c05c1d8
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-timeout.md
unknown
53b515f1-9171-4492-8351-95b2d4629ebb
0
SemanticChunker@1.0.0
373e5d164f4889d804c89e241dde3ac41883712a674ea4d2e81445aa9a9d6c5b
--- title: React useTimeout hook shortTitle: useTimeout hook language: react tags: [hooks,effect] cover: interior-10 excerpt: Implement `setTimeout()` in a declarative manner, using a custom hook. listed: true dateModified: 2024-06-23 --- Have you ever wanted to use `setTimeout()` in a declarative manner in React but ...
unknown
unknown
--- title: React useTimeout hook shortTitle: useTimeout hook language: react tags: [hooks,effect] cover: interior-10 excerpt: Implement `setTimeout()` in a declarative manner, using a custom hook. listed: true dateModified: 2024-06-23 --- Have you ever wanted to use `setTimeout()` in a declarative manner in React but ...
--- title: React useTimeout hook shortTitle: useTimeout hook language: react tags: [hooks,effect] cover: interior-10 excerpt: Implement `setTimeout()` in a declarative manner, using a custom hook. listed: true dateModified: 2024-06-23 --- Have you ever wanted to use `setTimeout()` in a declarative manner in React but ...
code_snippets
353a3807-7447-4201-a6ce-0965714e12a5
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-intersection-observer.md
unknown
7eed3b4e-c4aa-487d-884e-cce168ec5555
0
SemanticChunker@1.0.0
e466f69ea7bcffc14ffd22334c63dbe4ec9f60325d03c8b7be9014a896d32f69
--- title: React useIntersectionObserver hook shortTitle: useIntersectionObserver hook language: react tags: [hooks,state,effect] cover: light-leaves excerpt: Observe visibility changes for a given element, using the `IntersectionObserver` API. listed: true dateModified: 2024-06-26 --- JavaScript's `IntersectionObserv...
unknown
unknown
--- title: React useIntersectionObserver hook shortTitle: useIntersectionObserver hook language: react tags: [hooks,state,effect] cover: light-leaves excerpt: Observe visibility changes for a given element, using the `IntersectionObserver` API. listed: true dateModified: 2024-06-26 --- JavaScript's `IntersectionObserv...
--- title: React useIntersectionObserver hook shortTitle: useIntersectionObserver hook language: react tags: [hooks,state,effect] cover: light-leaves excerpt: Observe visibility changes for a given element, using the `IntersectionObserver` API. listed: true dateModified: 2024-06-26 --- JavaScript's `IntersectionObserv...
code_snippets
44f77af2-4991-4ec1-9c47-1feb0b132e48
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-hash-search-param.md
unknown
ca51ba9e-ff80-4b98-b3d6-0b7dfcd35826
0
SemanticChunker@1.0.0
3d48ae1670c350a16c29b6953faf03433cdc5a79fc5c61331c3e126d10d9ab2d
--- title: React useHash and useSearchParam hooks shortTitle: useHash and useSearchParam hooks language: react tags: [hooks,state,effect] cover: capsule-coffee excerpt: Track the browser's location hash value and search params with this pair of custom hooks. listed: true dateModified: 2024-06-30 --- If you want to tra...
unknown
unknown
--- title: React useHash and useSearchParam hooks shortTitle: useHash and useSearchParam hooks language: react tags: [hooks,state,effect] cover: capsule-coffee excerpt: Track the browser's location hash value and search params with this pair of custom hooks. listed: true dateModified: 2024-06-30 --- If you want to tra...
--- title: React useHash and useSearchParam hooks shortTitle: useHash and useSearchParam hooks language: react tags: [hooks,state,effect] cover: capsule-coffee excerpt: Track the browser's location hash value and search params with this pair of custom hooks. listed: true dateModified: 2024-06-30 --- If you want to tra...
code_snippets
61bfda2f-8a5e-47d0-8c24-7879b753211f
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-hash-search-param.md
unknown
ca51ba9e-ff80-4b98-b3d6-0b7dfcd35826
2
SemanticChunker@1.0.0
5ee8728ba394fe80744bc3f0fb9bad8080352212f291c2fbe2dc249a73cacba2
[`useHash` hook > `useSearchParam` hook] ## `useSearchParam` hook For the **search params**, the process is similar but a little more involved. You can create a custom hook that uses the `useState()` hook to lazily get the value of a specific search param using the `URLSearchParams()` constructor. Then, use the `use...
unknown
unknown
[`useHash` hook > `useSearchParam` hook] ## `useSearchParam` hook For the **search params**, the process is similar but a little more involved. You can create a custom hook that uses the `useState()` hook to lazily get the value of a specific search param using the `URLSearchParams()` constructor. Then, use the `use...
[`useHash` hook > `useSearchParam` hook] ## `useSearchParam` hook For the **search params**, the process is similar but a little more involved. You can create a custom hook that uses the `useState()` hook to lazily get the value of a specific search param using the `URLSearchParams()` constructor. Then, use the `use...
code_snippets
db549417-c0dc-451d-858e-7196257f1367
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-hash-search-param.md
unknown
ca51ba9e-ff80-4b98-b3d6-0b7dfcd35826
1
SemanticChunker@1.0.0
3320ba2d18698e6f3df77403154150f132484f096aca2e71ec853a7e9fe524e9
[`useHash` hook] ## `useHash` hook Tracking the browser's **location hash** value is the easier of the two tasks. All you need to do is create a custom hook that uses the `useState()` hook to lazily get the `hash` property of the `Location` object. You can then use the `useCallback()` hook to create a handler that u...
unknown
unknown
[`useHash` hook] ## `useHash` hook Tracking the browser's **location hash** value is the easier of the two tasks. All you need to do is create a custom hook that uses the `useState()` hook to lazily get the `hash` property of the `Location` object. You can then use the `useCallback()` hook to create a handler that u...
[`useHash` hook] ## `useHash` hook Tracking the browser's **location hash** value is the easier of the two tasks. All you need to do is create a custom hook that uses the `useState()` hook to lazily get the `hash` property of the `Location` object. You can then use the `useCallback()` hook to create a handler that u...
code_snippets
1a19ae6a-51a6-4d7d-abfe-8cb0324af797
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-state-with-label.md
unknown
eb29c05e-1d79-47a5-b430-121af0aee2b9
0
SemanticChunker@1.0.0
80f9c801c83d90a0b397857960cf9ad5384c060489cfa8f8b2756fb67ed0d8c0
--- title: Label your useState values in React developer tools shortTitle: Labelling useState values language: react tags: [hooks] cover: bunny-poster excerpt: Multiple `useState` hooks in React can complicate things while debugging. Luckily, there's an easy way to label these values. listed: true dateModified: 2021-11...
unknown
unknown
--- title: Label your useState values in React developer tools shortTitle: Labelling useState values language: react tags: [hooks] cover: bunny-poster excerpt: Multiple `useState` hooks in React can complicate things while debugging. Luckily, there's an easy way to label these values. listed: true dateModified: 2021-11...
--- title: Label your useState values in React developer tools shortTitle: Labelling useState values language: react tags: [hooks] cover: bunny-poster excerpt: Multiple `useState` hooks in React can complicate things while debugging. Luckily, there's an easy way to label these values. listed: true dateModified: 2021-11...
code_snippets
07941c7c-8b52-4ac0-95bf-c4009dd6dbdd
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250104-new-years-update.md
unknown
ec8ddc7f-0092-4f75-a3c6-4ffd5c5b76d2
1
SemanticChunker@1.0.0
b90b6b756eeef1e95737f2cb73b2659610a2c86b7228259eeb33e174c2e87d01
[Community involvement] ## Community involvement Community contributions have been restricted in one form or another for the better part of the past two years. As mentioned in previous updates, **my time and energy are limited**, and I've been focusing on creating content that I believe is valuable and engaging, rath...
unknown
unknown
[Community involvement] ## Community involvement Community contributions have been restricted in one form or another for the better part of the past two years. As mentioned in previous updates, **my time and energy are limited**, and I've been focusing on creating content that I believe is valuable and engaging, rath...
[Community involvement] ## Community involvement Community contributions have been restricted in one form or another for the better part of the past two years. As mentioned in previous updates, **my time and energy are limited**, and I've been focusing on creating content that I believe is valuable and engaging, rath...
code_snippets
4299aa0c-60c7-4792-a002-d412fd41fd2b
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250104-new-years-update.md
unknown
ec8ddc7f-0092-4f75-a3c6-4ffd5c5b76d2
3
SemanticChunker@1.0.0
0307eea1fe63e8d877c8fd640a956a3f3b9ed81fd74da6c256184295c0fc9844
[Community involvement > Journeys] ## Journeys The articles I've been working on in the past month or so are all part of the newly released [Complex objects](/js/s/complex-objects/p/1) collection. As this series is meant to be read in order, I've finally added a long standing backlog feature: **Journeys**. Journeys ...
unknown
unknown
[Community involvement > Journeys] ## Journeys The articles I've been working on in the past month or so are all part of the newly released [Complex objects](/js/s/complex-objects/p/1) collection. As this series is meant to be read in order, I've finally added a long standing backlog feature: **Journeys**. Journeys ...
[Community involvement > Journeys] ## Journeys The articles I've been working on in the past month or so are all part of the newly released [Complex objects](/js/s/complex-objects/p/1) collection. As this series is meant to be read in order, I've finally added a long standing backlog feature: **Journeys**. Journeys ...
code_snippets
c76b821b-2354-40df-8457-4884672a73d3
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250104-new-years-update.md
unknown
ec8ddc7f-0092-4f75-a3c6-4ffd5c5b76d2
4
SemanticChunker@1.0.0
7094ca28e72ee4291d44cf43ead6efd770da1858945c0dc9029ea7cc0b1d1f1d
[Community involvement > Terminology update] ## Terminology update For a while now, the terminology of the website has been a little ambiguous. What's an **article** and what's a **snippet**? Historically, this started out as a way to separate long-form content from shorter form code snippets, yet it has become a bit...
unknown
unknown
[Community involvement > Terminology update] ## Terminology update For a while now, the terminology of the website has been a little ambiguous. What's an **article** and what's a **snippet**? Historically, this started out as a way to separate long-form content from shorter form code snippets, yet it has become a bit...
[Community involvement > Terminology update] ## Terminology update For a while now, the terminology of the website has been a little ambiguous. What's an **article** and what's a **snippet**? Historically, this started out as a way to separate long-form content from shorter form code snippets, yet it has become a bit...
code_snippets
f43e2479-4d8a-4e63-a44b-e62e397e16ff
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250104-new-years-update.md
unknown
ec8ddc7f-0092-4f75-a3c6-4ffd5c5b76d2
2
SemanticChunker@1.0.0
2f469e14e29413ea5e2c877d9fd05644886dc89120086f817c4cf16b3b1a42af
[Community involvement > About page facelift] ## About page facelift The **About page** has been updated to reflect the current state of the website and my intentions for the future. It's a bit more personal now, and I hope it gives you a better idea of who I am and what I'm trying to achieve with 30 seconds of code....
unknown
unknown
[Community involvement > About page facelift] ## About page facelift The **About page** has been updated to reflect the current state of the website and my intentions for the future. It's a bit more personal now, and I hope it gives you a better idea of who I am and what I'm trying to achieve with 30 seconds of code....
[Community involvement > About page facelift] ## About page facelift The **About page** has been updated to reflect the current state of the website and my intentions for the future. It's a bit more personal now, and I hope it gives you a better idea of who I am and what I'm trying to achieve with 30 seconds of code....
code_snippets
f598b133-27e7-4fc0-a4b8-389f8fe237fe
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250104-new-years-update.md
unknown
ec8ddc7f-0092-4f75-a3c6-4ffd5c5b76d2
0
SemanticChunker@1.0.0
6c795f041b09d4dddf6296cb6e280519264605e4e821905569db419b2eaedb1c
--- title: New Year's update (2025) tags: [updatelog] cover: greek-coffee excerpt: With the new year come new beginnings. Here's a quick update on what's new and what's to come. listed: false dateModified: 2025-01-04 --- Happy New Year! 🎉 I hope you had a great holiday season and that you're ready to tackle the new ...
unknown
unknown
--- title: New Year's update (2025) tags: [updatelog] cover: greek-coffee excerpt: With the new year come new beginnings. Here's a quick update on what's new and what's to come. listed: false dateModified: 2025-01-04 --- Happy New Year! 🎉 I hope you had a great holiday season and that you're ready to tackle the new ...
--- title: New Year's update (2025) tags: [updatelog] cover: greek-coffee excerpt: With the new year come new beginnings. Here's a quick update on what's new and what's to come. listed: false dateModified: 2025-01-04 --- Happy New Year! 🎉 I hope you had a great holiday season and that you're ready to tackle the new ...
code_snippets
e0e14ca6-6449-4fae-9bbf-f77cc30a4de6
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/241211-the-future-of-30-seconds-of-code.md
unknown
7bcd0943-c604-4fe6-935e-eade9655f238
1
SemanticChunker@1.0.0
b2c0f08bbcf8e96499e841350ed52738fc2d1eab33fe7399d3139ec2387ed6ed
So what does this mean for the future? Mainly, that I'll share more deep dives like [Modeling complex JavaScript object collections in memory](/js/s/complex-object-collections-in-memory), opinion pieces, personal experiences, thoughts and insights. I'll keep on sharing short snippet content from time to time, but I'm h...
unknown
unknown
So what does this mean for the future? Mainly, that I'll share more deep dives like [Modeling complex JavaScript object collections in memory](/js/s/complex-object-collections-in-memory), opinion pieces, personal experiences, thoughts and insights. I'll keep on sharing short snippet content from time to time, but I'm h...
So what does this mean for the future? Mainly, that I'll share more deep dives like [Modeling complex JavaScript object collections in memory](/js/s/complex-object-collections-in-memory), opinion pieces, personal experiences, thoughts and insights. I'll keep on sharing short snippet content from time to time, but I'm h...
code_snippets
e563cc53-1f54-4734-8fa5-76c0ced41ee3
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/241211-the-future-of-30-seconds-of-code.md
unknown
7bcd0943-c604-4fe6-935e-eade9655f238
0
SemanticChunker@1.0.0
f988edcdc86c0060aedc66547975a151892cedf737f1181e709c7e1ee46c1e48
--- title: The future of 30 seconds of code tags: [updatelog] cover: coffee-n-laptop excerpt: After 7 years, here's a status update on what the future holds for 30 seconds of code. listed: false dateModified: 2024-12-11 --- Hey there! <span class="wave">👋</span> Thought I'd pop in to share some thoughts and news abo...
unknown
unknown
--- title: The future of 30 seconds of code tags: [updatelog] cover: coffee-n-laptop excerpt: After 7 years, here's a status update on what the future holds for 30 seconds of code. listed: false dateModified: 2024-12-11 --- Hey there! <span class="wave">👋</span> Thought I'd pop in to share some thoughts and news abo...
--- title: The future of 30 seconds of code tags: [updatelog] cover: coffee-n-laptop excerpt: After 7 years, here's a status update on what the future holds for 30 seconds of code. listed: false dateModified: 2024-12-11 --- Hey there! <span class="wave">👋</span> Thought I'd pop in to share some thoughts and news abo...
code_snippets
90bbdbf5-d541-4b22-9a2b-94d15be6e5e9
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/231007-will-it-still-take-30-seconds.md
unknown
50a3b244-6546-4934-84ec-d0ec9be6af62
1
SemanticChunker@1.0.0
6466c86e808afb84ff3348f4e30b4f75ed16f8fcf6495c14de6e1cdf5dc5c223
In the process of revamping, more **context** will be added, some things will be tidied up, more **examples** and **caveats** will be provided and some **concepts** explained more thoroughly. The aim is to **keep all of the existing content, but organize it better** and merge it where it makes sense. As this is a large...
unknown
unknown
In the process of revamping, more **context** will be added, some things will be tidied up, more **examples** and **caveats** will be provided and some **concepts** explained more thoroughly. The aim is to **keep all of the existing content, but organize it better** and merge it where it makes sense. As this is a large...
In the process of revamping, more **context** will be added, some things will be tidied up, more **examples** and **caveats** will be provided and some **concepts** explained more thoroughly. The aim is to **keep all of the existing content, but organize it better** and merge it where it makes sense. As this is a large...
code_snippets
fa20cead-05ec-4a0a-981b-2e51c9ddd4b1
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/231007-will-it-still-take-30-seconds.md
unknown
50a3b244-6546-4934-84ec-d0ec9be6af62
0
SemanticChunker@1.0.0
9c9400b6f4757dbbbd0da26852f129c8639de87a0f66d63e12b94ca7051c25b9
--- title: Will it still take 30 seconds? tags: [updatelog] cover: coffee-phone-tray-2 excerpt: A move away from short-form content and into slightly longer pieces. listed: false dateModified: 2023-10-07 --- Hello there! <span class="wave">👋</span> I've found myself writing these short updates quite often lately, I ...
unknown
unknown
--- title: Will it still take 30 seconds? tags: [updatelog] cover: coffee-phone-tray-2 excerpt: A move away from short-form content and into slightly longer pieces. listed: false dateModified: 2023-10-07 --- Hello there! <span class="wave">👋</span> I've found myself writing these short updates quite often lately, I ...
--- title: Will it still take 30 seconds? tags: [updatelog] cover: coffee-phone-tray-2 excerpt: A move away from short-form content and into slightly longer pieces. listed: false dateModified: 2023-10-07 --- Hello there! <span class="wave">👋</span> I've found myself writing these short updates quite often lately, I ...
code_snippets
4b95791e-0705-4b61-bea6-3483a86a630a
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250307-diving-ever-deeper.md
unknown
e4f50f50-e3e3-4f94-b8fc-53a2e90cc987
2
SemanticChunker@1.0.0
7e7a05f21e56d430fd9e9daadb2fcb1bdbf50b17895a1fcc261b62c3ab27a185
[Content focus > Community update] ## Community update After a few months of having **community contributions** open on GitHub, I haven't noticed any adverse effects, like the spam of the past. However, there's one little thing I want to address and that is **GitHub Discussions**. I find that they don't contribute m...
unknown
unknown
[Content focus > Community update] ## Community update After a few months of having **community contributions** open on GitHub, I haven't noticed any adverse effects, like the spam of the past. However, there's one little thing I want to address and that is **GitHub Discussions**. I find that they don't contribute m...
[Content focus > Community update] ## Community update After a few months of having **community contributions** open on GitHub, I haven't noticed any adverse effects, like the spam of the past. However, there's one little thing I want to address and that is **GitHub Discussions**. I find that they don't contribute m...
code_snippets
4e2d8b89-51d4-43b9-be46-812a1f6d567a
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250307-diving-ever-deeper.md
unknown
e4f50f50-e3e3-4f94-b8fc-53a2e90cc987
0
SemanticChunker@1.0.0
ea299fe318e76f77a6dc236b78bcb2f66a6ebb9f5589f9d69606991898010de4
--- title: Diving ever deeper into the deep end tags: [updatelog] cover: watermelon-bike excerpt: Larger projects and deeper dives seem to dominate this year's plans. listed: false dateModified: 2025-03-07 --- Hey there! <span class="wave">👋</span> Thought I'd take a break from coding to bring you an update on what'...
unknown
unknown
--- title: Diving ever deeper into the deep end tags: [updatelog] cover: watermelon-bike excerpt: Larger projects and deeper dives seem to dominate this year's plans. listed: false dateModified: 2025-03-07 --- Hey there! <span class="wave">👋</span> Thought I'd take a break from coding to bring you an update on what'...
--- title: Diving ever deeper into the deep end tags: [updatelog] cover: watermelon-bike excerpt: Larger projects and deeper dives seem to dominate this year's plans. listed: false dateModified: 2025-03-07 --- Hey there! <span class="wave">👋</span> Thought I'd take a break from coding to bring you an update on what'...
code_snippets
5a814fdb-f580-4da3-8509-6338796e4566
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250307-diving-ever-deeper.md
unknown
e4f50f50-e3e3-4f94-b8fc-53a2e90cc987
1
SemanticChunker@1.0.0
bb29d34d1e563091e4c79418e2b04a5d4dfa72b0a23b223dae0d802f9996f274
[Content focus] ## Content focus As you may well be aware by now, most of my recent articles are focused on **larger projects and deeper dives** into various topics. This is a trend I hope to continue for the rest of the year. The reason for this is twofold. First and foremost, **I enjoy challenging myself** and lea...
unknown
unknown
[Content focus] ## Content focus As you may well be aware by now, most of my recent articles are focused on **larger projects and deeper dives** into various topics. This is a trend I hope to continue for the rest of the year. The reason for this is twofold. First and foremost, **I enjoy challenging myself** and lea...
[Content focus] ## Content focus As you may well be aware by now, most of my recent articles are focused on **larger projects and deeper dives** into various topics. This is a trend I hope to continue for the rest of the year. The reason for this is twofold. First and foremost, **I enjoy challenging myself** and lea...
code_snippets
44a537ed-b514-47b7-b3f6-f60f14ca01b8
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/231020-content-creator-vs-content-curator.md
unknown
ac8b3884-d46c-48d8-a40e-b6b3584f8d1a
1
SemanticChunker@1.0.0
bf0e1dad4b3e7f06c8c2d3d3a72bf981b62cbb074f785466c10d2b4c7a057bf2
_So, what does this mean?_ In the long term, I'm not exactly sure myself, if I'm honest. In the short term, however, there's a very specific set of changes I want to make and content I aim to produce, so **new community contributions won't be prioritized**. Fixes, typos, discussions on existing content and ways to impr...
unknown
unknown
_So, what does this mean?_ In the long term, I'm not exactly sure myself, if I'm honest. In the short term, however, there's a very specific set of changes I want to make and content I aim to produce, so **new community contributions won't be prioritized**. Fixes, typos, discussions on existing content and ways to impr...
_So, what does this mean?_ In the long term, I'm not exactly sure myself, if I'm honest. In the short term, however, there's a very specific set of changes I want to make and content I aim to produce, so **new community contributions won't be prioritized**. Fixes, typos, discussions on existing content and ways to impr...
code_snippets
5a3e6c0f-6210-4e23-b13f-cab0c4a9daa6
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/231020-content-creator-vs-content-curator.md
unknown
ac8b3884-d46c-48d8-a40e-b6b3584f8d1a
0
SemanticChunker@1.0.0
281a75828229ce95e6a15bf666900c6293f54e4bc5c639bf59c1f13239291ed6
--- title: Content creator vs content curator tags: [updatelog] cover: computer-screens excerpt: Struggling with community contributions and the decision to prioritize content creation over curation. listed: false dateModified: 2023-10-20 --- Hey everyone, welcome back for another update log! 👋 This time around, I'm...
unknown
unknown
--- title: Content creator vs content curator tags: [updatelog] cover: computer-screens excerpt: Struggling with community contributions and the decision to prioritize content creation over curation. listed: false dateModified: 2023-10-20 --- Hey everyone, welcome back for another update log! 👋 This time around, I'm...
--- title: Content creator vs content curator tags: [updatelog] cover: computer-screens excerpt: Struggling with community contributions and the decision to prioritize content creation over curation. listed: false dateModified: 2023-10-20 --- Hey everyone, welcome back for another update log! 👋 This time around, I'm...
code_snippets
b62f90cd-36e0-4ebe-8764-2dec324ad9b2
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/231005-rewriting-history.md
unknown
eb6a396c-6dac-4a42-a453-3f2409c13101
0
SemanticChunker@1.0.0
c1dc86096ef171db51f98bf7c7fa295219d1c6245c99a5701446534abe592b95
--- title: (Re)writing history tags: [updatelog] cover: tea-laptop-table excerpt: Rebasing thousands of commits and rewriting history for a cleaner, more maintainable codebase. listed: false dateModified: 2023-10-05 --- Hello everyone! <span class="wave">👋</span> A quick update just in case you missed it: I recently...
unknown
unknown
--- title: (Re)writing history tags: [updatelog] cover: tea-laptop-table excerpt: Rebasing thousands of commits and rewriting history for a cleaner, more maintainable codebase. listed: false dateModified: 2023-10-05 --- Hello everyone! <span class="wave">👋</span> A quick update just in case you missed it: I recently...
--- title: (Re)writing history tags: [updatelog] cover: tea-laptop-table excerpt: Rebasing thousands of commits and rewriting history for a cleaner, more maintainable codebase. listed: false dateModified: 2023-10-05 --- Hello everyone! <span class="wave">👋</span> A quick update just in case you missed it: I recently...
code_snippets
8cefa223-89ab-41e2-b73a-dd9e09e5988d
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/230922-back-to-basics.md
unknown
34768b30-b907-4681-8573-b4257a37f3a1
0
SemanticChunker@1.0.0
588866d0cced915b96274015aea4f2eba2f16162c9b5eab6d99dff959877ce6f
--- title: Back to basics tags: [updatelog] cover: laptop-plants-2 excerpt: A quick status update about the state of the infrastructure and how centralization is back in fashion. listed: false dateModified: 2023-09-22 --- Hey everyone! <span class="wave">👋</span> I know it's been a little while and the Pull Requests...
unknown
unknown
--- title: Back to basics tags: [updatelog] cover: laptop-plants-2 excerpt: A quick status update about the state of the infrastructure and how centralization is back in fashion. listed: false dateModified: 2023-09-22 --- Hey everyone! <span class="wave">👋</span> I know it's been a little while and the Pull Requests...
--- title: Back to basics tags: [updatelog] cover: laptop-plants-2 excerpt: A quick status update about the state of the infrastructure and how centralization is back in fashion. listed: false dateModified: 2023-09-22 --- Hey everyone! <span class="wave">👋</span> I know it's been a little while and the Pull Requests...
code_snippets
232ea99c-1bfe-41ff-b298-c7c9ef97dbfe
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
6
SemanticChunker@1.0.0
9937d63354d406a3283495cf1c329c04464821c05138c3ee054a6ab63e16b2c9
[`useUnload` hook > `useMediaQuery` hook] ## `useMediaQuery` hook Speaking of responsive design, the `useMediaQuery` hook can be used to check if the current environment matches a given **media query** and return the appropriate value. In order to implement this hook, you'll need to check if `Window` and `Window.mat...
unknown
unknown
[`useUnload` hook > `useMediaQuery` hook] ## `useMediaQuery` hook Speaking of responsive design, the `useMediaQuery` hook can be used to check if the current environment matches a given **media query** and return the appropriate value. In order to implement this hook, you'll need to check if `Window` and `Window.mat...
[`useUnload` hook > `useMediaQuery` hook] ## `useMediaQuery` hook Speaking of responsive design, the `useMediaQuery` hook can be used to check if the current environment matches a given **media query** and return the appropriate value. In order to implement this hook, you'll need to check if `Window` and `Window.mat...
code_snippets
46e5d403-01ab-4fc3-89d6-31cb767d54a9
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
8
SemanticChunker@1.0.0
d9423d9bd2ae0c057a0f5e1c055917568593f5e96673fea8546da9383e34188d
[`useUnload` hook > `useIsomorphicEffect` hook] ## `useIsomorphicEffect` hook A further use-case for handling window and environment events is the `useIsomorphicEffect` hook. This hook resolves to `useEffect()` on the server and `useLayoutEffect()` on the client. To implement this hook, use `typeof` to check if the ...
unknown
unknown
[`useUnload` hook > `useIsomorphicEffect` hook] ## `useIsomorphicEffect` hook A further use-case for handling window and environment events is the `useIsomorphicEffect` hook. This hook resolves to `useEffect()` on the server and `useLayoutEffect()` on the client. To implement this hook, use `typeof` to check if the ...
[`useUnload` hook > `useIsomorphicEffect` hook] ## `useIsomorphicEffect` hook A further use-case for handling window and environment events is the `useIsomorphicEffect` hook. This hook resolves to `useEffect()` on the server and `useLayoutEffect()` on the client. To implement this hook, use `typeof` to check if the ...
code_snippets
707a9f6a-dc8d-4e74-8a8c-e8047f34c5b6
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
7
SemanticChunker@1.0.0
18fae72ebf5b3c62fc44da5ef114cad5219dbc03b4a4235d332a94f964eedbcb
[`useUnload` hook > `useSSR` hook] ## `useSSR` hook As we've already touched upon the subject of **server-side rendering** (SSR), it's worth mentioning the `useSSR` hook. This hook can be used to check if the code is running on the browser or the server. To implement this hook, you'll need to check if `Window`, `Win...
unknown
unknown
[`useUnload` hook > `useSSR` hook] ## `useSSR` hook As we've already touched upon the subject of **server-side rendering** (SSR), it's worth mentioning the `useSSR` hook. This hook can be used to check if the code is running on the browser or the server. To implement this hook, you'll need to check if `Window`, `Win...
[`useUnload` hook > `useSSR` hook] ## `useSSR` hook As we've already touched upon the subject of **server-side rendering** (SSR), it's worth mentioning the `useSSR` hook. This hook can be used to check if the code is running on the browser or the server. To implement this hook, you'll need to check if `Window`, `Win...
code_snippets
87372277-66d4-4f54-af3b-dfe544cb4112
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
3
SemanticChunker@1.0.0
0729e2e57cd4c1e434437e9aa55d746baccd87a918705cef76408296dd8ae027
[`useUnload` hook > `useWindowSize` hook] ## `useWindowSize` hook Tracking the **browser window's dimensions** can be useful for responsive design. The `useWindowSize` hook can be used to track the dimensions of the browser window. Using the `useState()` hook, you can initialize a state variable that will hold the w...
unknown
unknown
[`useUnload` hook > `useWindowSize` hook] ## `useWindowSize` hook Tracking the **browser window's dimensions** can be useful for responsive design. The `useWindowSize` hook can be used to track the dimensions of the browser window. Using the `useState()` hook, you can initialize a state variable that will hold the w...
[`useUnload` hook > `useWindowSize` hook] ## `useWindowSize` hook Tracking the **browser window's dimensions** can be useful for responsive design. The `useWindowSize` hook can be used to track the dimensions of the browser window. Using the `useState()` hook, you can initialize a state variable that will hold the w...
code_snippets
ae0c76ec-f274-4d4c-b52c-10e7ad85e483
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
5
SemanticChunker@1.0.0
16bc213cacc4769e435e4b306ec956643ce3479bb9484274d399fed4018e7f99
[`useUnload` hook > `useOnWindowScroll` hook] ## `useOnWindowScroll` hook Similar to the `useOnWindowResize` hook, the `useOnWindowScroll` hook executes a callback whenever the **window is scrolled**. The implementation is virtually identical to the previous hook, except that it listens for the `'scroll'` event inst...
unknown
unknown
[`useUnload` hook > `useOnWindowScroll` hook] ## `useOnWindowScroll` hook Similar to the `useOnWindowResize` hook, the `useOnWindowScroll` hook executes a callback whenever the **window is scrolled**. The implementation is virtually identical to the previous hook, except that it listens for the `'scroll'` event inst...
[`useUnload` hook > `useOnWindowScroll` hook] ## `useOnWindowScroll` hook Similar to the `useOnWindowResize` hook, the `useOnWindowScroll` hook executes a callback whenever the **window is scrolled**. The implementation is virtually identical to the previous hook, except that it listens for the `'scroll'` event inst...
code_snippets
b38c6646-9c23-4114-bd8c-9fc19e98d97f
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
1
SemanticChunker@1.0.0
4233e9a039525b637884ea34cc41029b5c8cd6c483dfe3f28b71c34092dca9b7
[`useUnload` hook] ## `useUnload` hook The `useUnload` hook is used to handle the `beforeunload` window event. This event is triggered when the user is **about to close the window**. In order to implement this hook, you'll need to use the `useRef()` and `useEffect()` hooks. The `useRef()` hook is used to create a re...
unknown
unknown
[`useUnload` hook] ## `useUnload` hook The `useUnload` hook is used to handle the `beforeunload` window event. This event is triggered when the user is **about to close the window**. In order to implement this hook, you'll need to use the `useRef()` and `useEffect()` hooks. The `useRef()` hook is used to create a re...
[`useUnload` hook] ## `useUnload` hook The `useUnload` hook is used to handle the `beforeunload` window event. This event is triggered when the user is **about to close the window**. In order to implement this hook, you'll need to use the `useRef()` and `useEffect()` hooks. The `useRef()` hook is used to create a re...
code_snippets
d49f4efc-4102-4885-83d0-14635a57bd8b
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
0
SemanticChunker@1.0.0
6672150e2539a0e3c7cfd4250b3af83e7abbfeb3359cd25783870a1a3b3edeab
--- title: React hooks to handle window and environment events shortTitle: Window and environment hooks language: react tags: [hooks,state,effect,event,memo] cover: jars-on-shelf-2 excerpt: Learn how to use React hooks to handle window events, media queries, server-side rendering and more. listed: true dateModified: 20...
unknown
unknown
--- title: React hooks to handle window and environment events shortTitle: Window and environment hooks language: react tags: [hooks,state,effect,event,memo] cover: jars-on-shelf-2 excerpt: Learn how to use React hooks to handle window events, media queries, server-side rendering and more. listed: true dateModified: 20...
--- title: React hooks to handle window and environment events shortTitle: Window and environment hooks language: react tags: [hooks,state,effect,event,memo] cover: jars-on-shelf-2 excerpt: Learn how to use React hooks to handle window events, media queries, server-side rendering and more. listed: true dateModified: 20...
code_snippets
d80cbbc3-bbec-4bbd-82e0-d381c8bfc29d
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
4
SemanticChunker@1.0.0
a80e7e1d54345dddc3338862d94f7ea65d6ca703fbe7f7a4b8560a206bf2bb7f
[`useUnload` hook > `useOnWindowResize`] ## `useOnWindowResize` All's good and well, but what about when you want to execute a callback whenever the **window is resized**? The `useOnWindowResize` hook can help you with that. In order to implement it, you'll need to listen for the `'resize'` event on the `Window` glo...
unknown
unknown
[`useUnload` hook > `useOnWindowResize`] ## `useOnWindowResize` All's good and well, but what about when you want to execute a callback whenever the **window is resized**? The `useOnWindowResize` hook can help you with that. In order to implement it, you'll need to listen for the `'resize'` event on the `Window` glo...
[`useUnload` hook > `useOnWindowResize`] ## `useOnWindowResize` All's good and well, but what about when you want to execute a callback whenever the **window is resized**? The `useOnWindowResize` hook can help you with that. In order to implement it, you'll need to listen for the `'resize'` event on the `Window` glo...
code_snippets
f974fbcf-123a-45ca-ae8e-a1baf2fb07b0
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/window-global-environment-ssr-hooks.md
unknown
df4bd129-ffed-4c79-bae9-498631fe744d
2
SemanticChunker@1.0.0
7b876422c09e366b6a502861d89161d448b1a6e88533a71c88ccf5da30c564aa
[`useUnload` hook > `useOnline` hook] ## `useOnline` hook To check if a client is **online or offline**, you can use the `useOnline` hook. This hook uses the `Navigator.onLine` web API to get the online status of the client. Implementation-wise, you'll need to create a function, `getOnLineStatus`, that uses the `Nav...
unknown
unknown
[`useUnload` hook > `useOnline` hook] ## `useOnline` hook To check if a client is **online or offline**, you can use the `useOnline` hook. This hook uses the `Navigator.onLine` web API to get the online status of the client. Implementation-wise, you'll need to create a function, `getOnLineStatus`, that uses the `Nav...
[`useUnload` hook > `useOnline` hook] ## `useOnline` hook To check if a client is **online or offline**, you can use the `useOnline` hook. This hook uses the `Navigator.onLine` web API to get the online status of the client. Implementation-wise, you'll need to create a function, `getOnLineStatus`, that uses the `Nav...
code_snippets
468f58de-3328-412c-a74d-9cd701f92bf8
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/s/use-update.md
unknown
d041936e-06a3-46b9-ae68-ba125ed73f01
0
SemanticChunker@1.0.0
3e2f719eeb89e9a57ca8a964214daa5afcc44bb3b1450515116364879006671d
--- title: Force a React component to re-render shortTitle: useUpdate hook language: react tags: [hooks,reducer] cover: lavender-shelf excerpt: Ever wanted to force update a React component? Here's a custom hook that does just that. listed: true dateModified: 2024-06-27 --- React's rendering loop is based on the state...
unknown
unknown
--- title: Force a React component to re-render shortTitle: useUpdate hook language: react tags: [hooks,reducer] cover: lavender-shelf excerpt: Ever wanted to force update a React component? Here's a custom hook that does just that. listed: true dateModified: 2024-06-27 --- React's rendering loop is based on the state...
--- title: Force a React component to re-render shortTitle: useUpdate hook language: react tags: [hooks,reducer] cover: lavender-shelf excerpt: Ever wanted to force update a React component? Here's a custom hook that does just that. listed: true dateModified: 2024-06-27 --- React's rendering loop is based on the state...
code_snippets
cca2d08b-afe3-43f2-9a14-4c6fe501a9b4
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/react/snippet-template.md
unknown
f637c19d-9b84-4ac3-82a7-130f50747b9b
0
SemanticChunker@1.0.0
8e04fb5633a51642383e820fc27bec08f432aa105e8ed555531ffe20dcb29705
--- title: My amazing story shortTitle: Amazing story language: react tags: [hooks] cover: image excerpt: A short summary of your story up to 140 characters long. listed: true dateModified: 2021-06-13 --- Write your story here.
unknown
unknown
--- title: My amazing story shortTitle: Amazing story language: react tags: [hooks] cover: image excerpt: A short summary of your story up to 140 characters long. listed: true dateModified: 2021-06-13 --- Write your story here.
--- title: My amazing story shortTitle: Amazing story language: react tags: [hooks] cover: image excerpt: A short summary of your story up to 140 characters long. listed: true dateModified: 2021-06-13 --- Write your story here.
code_snippets
454b6d23-b225-4a54-8fb4-218da028953a
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-compare.md
unknown
7e0e38a8-ed73-4b71-99fa-6273eda571ea
0
SemanticChunker@1.0.0
616047e2547668fb02b6a190563cbe8d4e7f04f1fe9279fce68c49b050bf50a3
--- title: How do I compare two arrays in JavaScript? shortTitle: JavaScript array comparison test: true language: javascript tags: [array,comparison] cover: coconuts excerpt: Learn how you can compare two arrays in JavaScript using various different techniques. listed: true dateModified: 2021-09-27 ---
unknown
unknown
--- title: How do I compare two arrays in JavaScript? shortTitle: JavaScript array comparison test: true language: javascript tags: [array,comparison] cover: coconuts excerpt: Learn how you can compare two arrays in JavaScript using various different techniques. listed: true dateModified: 2021-09-27 ---
--- title: How do I compare two arrays in JavaScript? shortTitle: JavaScript array comparison test: true language: javascript tags: [array,comparison] cover: coconuts excerpt: Learn how you can compare two arrays in JavaScript using various different techniques. listed: true dateModified: 2021-09-27 ---
code_snippets
5c6bfe0d-38ae-4921-a7f2-1a3b09f701d4
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-compare.md
unknown
7e0e38a8-ed73-4b71-99fa-6273eda571ea
1
SemanticChunker@1.0.0
262b7ce6191e35851e795e09ed0e54c27e564618da71848b9614b795f02c49f6
[Equality comparison > JSON.stringify] ## JSON.stringify This works, but it's slow. ```js const equals = (a, b) => JSON.stringify(a) === JSON.stringify(b); const a = [1, 2, 3]; const b = [1, 2, 3]; equals(a, b); // true ```
unknown
unknown
[Equality comparison > JSON.stringify] ## JSON.stringify This works, but it's slow. ```js const equals = (a, b) => JSON.stringify(a) === JSON.stringify(b); const a = [1, 2, 3]; const b = [1, 2, 3]; equals(a, b); // true ```
[Equality comparison > JSON.stringify] ## JSON.stringify This works, but it's slow. ```js const equals = (a, b) => JSON.stringify(a) === JSON.stringify(b); const a = [1, 2, 3]; const b = [1, 2, 3]; equals(a, b); // true ```
code_snippets
c91817c7-dd4d-49b7-9e79-5cd8aacf4c46
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-compare.md
unknown
7e0e38a8-ed73-4b71-99fa-6273eda571ea
2
SemanticChunker@1.0.0
95535b5527caedb4e8332609ed0e4a974b093b250df1f47fb9e95ae6aef49fbb
[Equality comparison > Deep equality] ## Deep equality _Deep_ equality is **just better**. ```js const equals = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]); const a = [1, 2, 3]; const b = [1, 2, 3]; const str = 'a'; const strObj = new String('a'); equals(a, b); // true equals([str], [strObj]...
unknown
unknown
[Equality comparison > Deep equality] ## Deep equality _Deep_ equality is **just better**. ```js const equals = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]); const a = [1, 2, 3]; const b = [1, 2, 3]; const str = 'a'; const strObj = new String('a'); equals(a, b); // true equals([str], [strObj]...
[Equality comparison > Deep equality] ## Deep equality _Deep_ equality is **just better**. ```js const equals = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]); const a = [1, 2, 3]; const b = [1, 2, 3]; const str = 'a'; const strObj = new String('a'); equals(a, b); // true equals([str], [strObj]...
code_snippets
17523b55-d2b2-404f-93a3-890a656fd994
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/css/s/content-centering.md
unknown
74ca846e-3765-419b-89bf-321cbab7927f
0
SemanticChunker@1.0.0
d374848684e87756a3c951519aee36aabac7783268ac14c9d70849ea9d0170a9
--- title: Centering content with CSS test: true language: css tags: [layout] cover: polar-bear excerpt: Centering content with CSS might often feel difficult. Here are 4 easy ways you can do it. listed: true dateModified: 2024-05-07 --- _How to center a div_ has become a little bit of a joke in the web development co...
unknown
unknown
--- title: Centering content with CSS test: true language: css tags: [layout] cover: polar-bear excerpt: Centering content with CSS might often feel difficult. Here are 4 easy ways you can do it. listed: true dateModified: 2024-05-07 --- _How to center a div_ has become a little bit of a joke in the web development co...
--- title: Centering content with CSS test: true language: css tags: [layout] cover: polar-bear excerpt: Centering content with CSS might often feel difficult. Here are 4 easy ways you can do it. listed: true dateModified: 2024-05-07 --- _How to center a div_ has become a little bit of a joke in the web development co...
code_snippets
1cd556eb-e246-44d3-9732-80deabb604e2
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/css/s/content-centering.md
unknown
74ca846e-3765-419b-89bf-321cbab7927f
3
SemanticChunker@1.0.0
8fc083b140c055dd5079a574a71090d5da6dc3d7b48e97250fef63c2df9d43bc
[Flexbox centering > Transform centering] ## Transform centering Transform centering uses, as the name implies, **CSS transforms** to center an element. ```html <div class="transform-centering"> <div class="content">Content</div> </div> ``` ```css .transform-centering { position: relative; } .transform-centering...
unknown
unknown
[Flexbox centering > Transform centering] ## Transform centering Transform centering uses, as the name implies, **CSS transforms** to center an element. ```html <div class="transform-centering"> <div class="content">Content</div> </div> ``` ```css .transform-centering { position: relative; } .transform-centering...
[Flexbox centering > Transform centering] ## Transform centering Transform centering uses, as the name implies, **CSS transforms** to center an element. ```html <div class="transform-centering"> <div class="content">Content</div> </div> ``` ```css .transform-centering { position: relative; } .transform-centering...
code_snippets
36946ac9-57f7-4538-a663-d331f654513b
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/css/s/content-centering.md
unknown
74ca846e-3765-419b-89bf-321cbab7927f
1
SemanticChunker@1.0.0
a59ce8ca3b362a83220cda5ddcc5a66d7eb770d358694bc61029e1795130bcab
[Flexbox centering] ## Flexbox centering Using **flexbox** to vertically and horizontally center content is usually the **preferred method**. ```html <div class="flexbox-centering"> <div class="content">Content</div> </div> ``` ```css .flexbox-centering { display: flex; justify-content: center; align-items: cen...
unknown
unknown
[Flexbox centering] ## Flexbox centering Using **flexbox** to vertically and horizontally center content is usually the **preferred method**. ```html <div class="flexbox-centering"> <div class="content">Content</div> </div> ``` ```css .flexbox-centering { display: flex; justify-content: center; align-items: cen...
[Flexbox centering] ## Flexbox centering Using **flexbox** to vertically and horizontally center content is usually the **preferred method**. ```html <div class="flexbox-centering"> <div class="content">Content</div> </div> ``` ```css .flexbox-centering { display: flex; justify-content: center; align-items: cen...
code_snippets
9d047fbf-4078-440a-b3bd-33aa1f29bce2
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/css/s/content-centering.md
unknown
74ca846e-3765-419b-89bf-321cbab7927f
2
SemanticChunker@1.0.0
e9df1827921ce1d59696c31bef706c88c3c7427d8a049da40726d250201a204c
[Flexbox centering > Grid centering] ## Grid centering Using the **grid module** is very similar to flexbox and also a common technique, especially if you are **already using grid in your layout**. ```html <div class="grid-centering"> <div class="content">Content</div> </div> ``` ```css .grid-centering { display:...
unknown
unknown
[Flexbox centering > Grid centering] ## Grid centering Using the **grid module** is very similar to flexbox and also a common technique, especially if you are **already using grid in your layout**. ```html <div class="grid-centering"> <div class="content">Content</div> </div> ``` ```css .grid-centering { display:...
[Flexbox centering > Grid centering] ## Grid centering Using the **grid module** is very similar to flexbox and also a common technique, especially if you are **already using grid in your layout**. ```html <div class="grid-centering"> <div class="content">Content</div> </div> ``` ```css .grid-centering { display:...
code_snippets
e609fb93-e009-44bd-9721-b1a7e6091728
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/css/s/content-centering.md
unknown
74ca846e-3765-419b-89bf-321cbab7927f
4
SemanticChunker@1.0.0
9b463c29c37468421d4ac5f42d40ba6a18e5426d9bef4415be37e673d96c09c6
[Flexbox centering > Table centering] ## Table centering Last but not least, **table** centering is an older technique which you might favor when working with **older browsers**. ```html <div class="table-centering"> <div class="content">Content</div> </div> ``` ```css .table-centering { display: table; height: ...
unknown
unknown
[Flexbox centering > Table centering] ## Table centering Last but not least, **table** centering is an older technique which you might favor when working with **older browsers**. ```html <div class="table-centering"> <div class="content">Content</div> </div> ``` ```css .table-centering { display: table; height: ...
[Flexbox centering > Table centering] ## Table centering Last but not least, **table** centering is an older technique which you might favor when working with **older browsers**. ```html <div class="table-centering"> <div class="content">Content</div> </div> ``` ```css .table-centering { display: table; height: ...
code_snippets
22213f02-b413-4e8e-8a87-5baabc559318
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/articles/s/web-development-tips.md
unknown
990fe9ea-47db-43d5-9e04-8fbb38fdd27e
0
SemanticChunker@1.0.0
bb8e42610623a84dbee5d23eb139341fd159a176d40a87b258ec21f29f783a41
--- title: Web development tips test: true tags: [webdev] cover: do-more-computer excerpt: This is a test snippet, do not publish it! listed: false dateModified: 2021-09-27 --- This is a **test** snippet. It is intended to provide a centralized place to _test_ all sorts of `markdown` content that one could produce in ...
unknown
unknown
--- title: Web development tips test: true tags: [webdev] cover: do-more-computer excerpt: This is a test snippet, do not publish it! listed: false dateModified: 2021-09-27 --- This is a **test** snippet. It is intended to provide a centralized place to _test_ all sorts of `markdown` content that one could produce in ...
--- title: Web development tips test: true tags: [webdev] cover: do-more-computer excerpt: This is a test snippet, do not publish it! listed: false dateModified: 2021-09-27 --- This is a **test** snippet. It is intended to provide a centralized place to _test_ all sorts of `markdown` content that one could produce in ...
code_snippets
401b5f40-2353-4c77-ba78-5a4ec7c78643
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/articles/s/web-development-tips.md
unknown
990fe9ea-47db-43d5-9e04-8fbb38fdd27e
1
SemanticChunker@1.0.0
e668a4c306346e017077a5f90e16666147de5ecf4c75b070e088ef2ca5e4c7ea
[This is a level 2 heading with `some code`] ## This is a level 2 heading with `some code` Links come in all shapes and sizes. They are often in the form of an automatically generated reference, such as `Array.from()`. And some other times, you might get a mixed content link, such as a link for the [modulo operator(...
unknown
unknown
[This is a level 2 heading with `some code`] ## This is a level 2 heading with `some code` Links come in all shapes and sizes. They are often in the form of an automatically generated reference, such as `Array.from()`. And some other times, you might get a mixed content link, such as a link for the [modulo operator(...
[This is a level 2 heading with `some code`] ## This is a level 2 heading with `some code` Links come in all shapes and sizes. They are often in the form of an automatically generated reference, such as `Array.from()`. And some other times, you might get a mixed content link, such as a link for the [modulo operator(...
code_snippets
0f098df3-e513-4941-8ce2-549e525fabc8
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/css/s/css-reset.md
unknown
d76ac146-ff7b-48d8-a432-3f263e6f8fdf
1
SemanticChunker@1.0.0
b84bbdff22f6101787972b44becc6875fe731b0090eac519a03a3c7b5e6eae32
- `html`: - `max-width` - Use `ch` units to set the maximum width in the middle of the optimal readable range (60-80 characters). - `margin` - Center content on the page. - `padding` - Prevent edge-to-edge text on smaller viewports. - `font-family` - Use the [system font stack](/css/s/system-font-stack) to ensure t...
unknown
unknown
- `html`: - `max-width` - Use `ch` units to set the maximum width in the middle of the optimal readable range (60-80 characters). - `margin` - Center content on the page. - `padding` - Prevent edge-to-edge text on smaller viewports. - `font-family` - Use the [system font stack](/css/s/system-font-stack) to ensure t...
- `html`: - `max-width` - Use `ch` units to set the maximum width in the middle of the optimal readable range (60-80 characters). - `margin` - Center content on the page. - `padding` - Prevent edge-to-edge text on smaller viewports. - `font-family` - Use the [system font stack](/css/s/system-font-stack) to ensure t...
code_snippets
62a586b9-3537-4222-9d57-16e495fefb3f
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/css/s/css-reset.md
unknown
d76ac146-ff7b-48d8-a432-3f263e6f8fdf
0
SemanticChunker@1.0.0
1c7cd5e4124568969e83dc4305b64619d52ebe89916bd79cd289f09615b55497
--- title: CSS Reset test: true language: css tags: [visual] cover: bridge-over-road excerpt: A short, opinionated CSS reset to make your websites look great everywhere. listed: true dateModified: 2022-10-16 --- Browsers nowadays are much better at presenting HTML in a consistent manner, making CSS resets of the past ...
unknown
unknown
--- title: CSS Reset test: true language: css tags: [visual] cover: bridge-over-road excerpt: A short, opinionated CSS reset to make your websites look great everywhere. listed: true dateModified: 2022-10-16 --- Browsers nowadays are much better at presenting HTML in a consistent manner, making CSS resets of the past ...
--- title: CSS Reset test: true language: css tags: [visual] cover: bridge-over-road excerpt: A short, opinionated CSS reset to make your websites look great everywhere. listed: true dateModified: 2022-10-16 --- Browsers nowadays are much better at presenting HTML in a consistent manner, making CSS resets of the past ...
code_snippets
0869cb6c-6298-4ad2-b49c-fb13bbd53bef
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/logo/logo-guidelines.md
unknown
1830d481-f6f3-4227-9700-87345a58a48b
1
SemanticChunker@1.0.0
1708513c7dec7edab902b9487bcb27878f6351b202b5d526acf16ee64a8fa222
[Logo guidelines > Placement guide] ## Placement guide ![placement-guide](/logo/logo-resources/placement-guide.png) The free space around the logo is calculated using the top inner circle of the letter "3" in the logo. The minimum free space around the logo is a full circle on either side on the horizontal axis and ...
unknown
unknown
[Logo guidelines > Placement guide] ## Placement guide ![placement-guide](/logo/logo-resources/placement-guide.png) The free space around the logo is calculated using the top inner circle of the letter "3" in the logo. The minimum free space around the logo is a full circle on either side on the horizontal axis and ...
[Logo guidelines > Placement guide] ## Placement guide ![placement-guide](/logo/logo-resources/placement-guide.png) The free space around the logo is calculated using the top inner circle of the letter "3" in the logo. The minimum free space around the logo is a full circle on either side on the horizontal axis and ...
code_snippets
18599fda-376d-4360-8c20-aa3ad17d5178
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/logo/logo-guidelines.md
unknown
1830d481-f6f3-4227-9700-87345a58a48b
0
SemanticChunker@1.0.0
60cfd6781b456301701f46c16fb3ceaca90c6015b3f4edb6be4bb072a3fc2569
[Logo guidelines > Logo] ## Logo | Regular | Monochrome | | --- | --- | | ![logo](/logo/logo-resources/logo.png) | ![monochrome](/logo/logo-resources/logo-monochrome.png) | | Grayscale | With Background | | --- | --- | | ![grayscale](/logo/logo-resources/logo-grayscale.png) | ![bg](/logo/logo-resources/logo-bg.png) ...
unknown
unknown
[Logo guidelines > Logo] ## Logo | Regular | Monochrome | | --- | --- | | ![logo](/logo/logo-resources/logo.png) | ![monochrome](/logo/logo-resources/logo-monochrome.png) | | Grayscale | With Background | | --- | --- | | ![grayscale](/logo/logo-resources/logo-grayscale.png) | ![bg](/logo/logo-resources/logo-bg.png) ...
[Logo guidelines > Logo] ## Logo | Regular | Monochrome | | --- | --- | | ![logo](/logo/logo-resources/logo.png) | ![monochrome](/logo/logo-resources/logo-monochrome.png) | | Grayscale | With Background | | --- | --- | | ![grayscale](/logo/logo-resources/logo-grayscale.png) | ![bg](/logo/logo-resources/logo-bg.png) ...
code_snippets
3fc2384c-c970-4b81-8502-1f943000fc03
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/logo/logo-guidelines.md
unknown
1830d481-f6f3-4227-9700-87345a58a48b
2
SemanticChunker@1.0.0
7cd03e535988f84bf296007de38dd58236bdd42faf3ada99e384a2dac0187d57
[Logo guidelines > Logo misuse] ## Logo misuse - Never crop, rotate, invert, or distort the logo. - Never add an outline, shadow, or glow to the logo. - Never use any other color for the logo, except for the ones provided in this guide. - Avoid using the logo in busy backgrounds or against backgrounds where it's hard...
unknown
unknown
[Logo guidelines > Logo misuse] ## Logo misuse - Never crop, rotate, invert, or distort the logo. - Never add an outline, shadow, or glow to the logo. - Never use any other color for the logo, except for the ones provided in this guide. - Avoid using the logo in busy backgrounds or against backgrounds where it's hard...
[Logo guidelines > Logo misuse] ## Logo misuse - Never crop, rotate, invert, or distort the logo. - Never add an outline, shadow, or glow to the logo. - Never use any other color for the logo, except for the ones provided in this guide. - Avoid using the logo in busy backgrounds or against backgrounds where it's hard...
code_snippets
299fa922-ae83-4def-9cbb-96b3db7e5681
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250922-time-for-a-break.md
unknown
3784bb9b-8fc2-4f40-a2fb-91078bf9d498
0
SemanticChunker@1.0.0
d9f6f708ecf0df5f1abbafbbc6541bc9a1820312f68acc7ac8f7965d5ab48929
--- title: Time for a break tags: [updatelog] cover: coffee-n-laptop-4 excerpt: A quick status update about how I'm taking a break to recharge and refocus. listed: false dateModified: 2025-09-22 --- Hey there! <span class="wave">👋</span> It's been a little while since the last update, so I thought I'd drop by with a...
unknown
unknown
--- title: Time for a break tags: [updatelog] cover: coffee-n-laptop-4 excerpt: A quick status update about how I'm taking a break to recharge and refocus. listed: false dateModified: 2025-09-22 --- Hey there! <span class="wave">👋</span> It's been a little while since the last update, so I thought I'd drop by with a...
--- title: Time for a break tags: [updatelog] cover: coffee-n-laptop-4 excerpt: A quick status update about how I'm taking a break to recharge and refocus. listed: false dateModified: 2025-09-22 --- Hey there! <span class="wave">👋</span> It's been a little while since the last update, so I thought I'd drop by with a...
code_snippets
71e9c98e-a3dd-48dc-80c8-b18eaf5190e0
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250609-blogging-in-the-age-of-ai.md
unknown
8d977caa-d3c6-44ac-a190-0eac7d132833
0
SemanticChunker@1.0.0
4a29f5d352d162379ab18474dc1b2aa8a52188c071f4303feae81b8a4851b868
--- title: Blogging in the age of AI tags: [updatelog] cover: interior-18 excerpt: As AI continues to evolve, so does the landscape of blogging. How is 30 seconds of code adapting to these changes? listed: false dateModified: 2025-06-09 --- Hi there! <span class="wave">👋</span> It's been a few weeks since the last u...
unknown
unknown
--- title: Blogging in the age of AI tags: [updatelog] cover: interior-18 excerpt: As AI continues to evolve, so does the landscape of blogging. How is 30 seconds of code adapting to these changes? listed: false dateModified: 2025-06-09 --- Hi there! <span class="wave">👋</span> It's been a few weeks since the last u...
--- title: Blogging in the age of AI tags: [updatelog] cover: interior-18 excerpt: As AI continues to evolve, so does the landscape of blogging. How is 30 seconds of code adapting to these changes? listed: false dateModified: 2025-06-09 --- Hi there! <span class="wave">👋</span> It's been a few weeks since the last u...
code_snippets
f65f347f-ef9a-4279-868e-3fc5f49f4b23
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250609-blogging-in-the-age-of-ai.md
unknown
8d977caa-d3c6-44ac-a190-0eac7d132833
1
SemanticChunker@1.0.0
4efb7007c3e97d9c84ec6db6fc87f9975b9fa565e4d6c1a9595a19002486632d
This shift in our collective behavior has made me realize how irrelevant SEO is becoming in some ways. This is one of the reasons why I dropped Google Analytics and Google Search Console from the site. Without metrics, it's more fun **pursuing my passions and not worrying about bean counters**, writing what I like and ...
unknown
unknown
This shift in our collective behavior has made me realize how irrelevant SEO is becoming in some ways. This is one of the reasons why I dropped Google Analytics and Google Search Console from the site. Without metrics, it's more fun **pursuing my passions and not worrying about bean counters**, writing what I like and ...
This shift in our collective behavior has made me realize how irrelevant SEO is becoming in some ways. This is one of the reasons why I dropped Google Analytics and Google Search Console from the site. Without metrics, it's more fun **pursuing my passions and not worrying about bean counters**, writing what I like and ...
code_snippets
d76ac9dc-c459-4477-b532-ee635f2afb3c
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/snippet-template.md
unknown
c45480f5-fb6d-4974-a94f-9caf7c138c4c
0
SemanticChunker@1.0.0
1628d2c781914bd9912cd050c39abb062e67edf13cadaba8e61ba77a54b4d700
--- title: My amazing update log shortTitle: Amazing update log tags: [updatelog] cover: image excerpt: A short summary of your update log up to 140 characters long. listed: false dateModified: 2024-12-11 --- Write your update log here.
unknown
unknown
--- title: My amazing update log shortTitle: Amazing update log tags: [updatelog] cover: image excerpt: A short summary of your update log up to 140 characters long. listed: false dateModified: 2024-12-11 --- Write your update log here.
--- title: My amazing update log shortTitle: Amazing update log tags: [updatelog] cover: image excerpt: A short summary of your update log up to 140 characters long. listed: false dateModified: 2024-12-11 --- Write your update log here.
code_snippets
0c8ecad0-e68e-485d-a0ef-dff1cef22cf9
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250507-content-enrichment.md
unknown
13511fcb-c6b2-45bf-8f82-f44acff542b0
1
SemanticChunker@1.0.0
e946bfa1406124539048818546a91c8d62030da0864c264ed5ec109a2f566681
[Rich content authoring] ## Rich content authoring One of the things that I haven't really been able to do in the past is to create **truly rich content**. So, as usual, I decided to make my own tools to fit my needs. After a lot of fiddling around, I managed to create a system around Web Components, allowing me to ...
unknown
unknown
[Rich content authoring] ## Rich content authoring One of the things that I haven't really been able to do in the past is to create **truly rich content**. So, as usual, I decided to make my own tools to fit my needs. After a lot of fiddling around, I managed to create a system around Web Components, allowing me to ...
[Rich content authoring] ## Rich content authoring One of the things that I haven't really been able to do in the past is to create **truly rich content**. So, as usual, I decided to make my own tools to fit my needs. After a lot of fiddling around, I managed to create a system around Web Components, allowing me to ...
code_snippets
851f28a6-d353-479c-9493-cf6dda4252f3
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250507-content-enrichment.md
unknown
13511fcb-c6b2-45bf-8f82-f44acff542b0
3
SemanticChunker@1.0.0
a3d7408a323458234621bce81a93674855de1820374e4624fbf6e44d27470286
[Rich content authoring > Article embedding] ## Article embedding On top of these changes, I worked out a way to embed article previews inside other articles. These appear similar to article previews in listings, so they should be familiar. I also made sure to make them as least intrusive as possible, so they should ...
unknown
unknown
[Rich content authoring > Article embedding] ## Article embedding On top of these changes, I worked out a way to embed article previews inside other articles. These appear similar to article previews in listings, so they should be familiar. I also made sure to make them as least intrusive as possible, so they should ...
[Rich content authoring > Article embedding] ## Article embedding On top of these changes, I worked out a way to embed article previews inside other articles. These appear similar to article previews in listings, so they should be familiar. I also made sure to make them as least intrusive as possible, so they should ...
code_snippets
a8219172-441d-49bc-8c68-cb54a0bbcb04
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250507-content-enrichment.md
unknown
13511fcb-c6b2-45bf-8f82-f44acff542b0
0
SemanticChunker@1.0.0
5def1e85fc0f3b0ba8312378bfc4df4d97a8f8f01ebc379b467b0f5dbf216cb8
--- title: Content enrichment tags: [updatelog] cover: paper-card excerpt: I've been working on new content authoring tools behind the scenes and I'm excited to share them with you! listed: false dateModified: 2025-05-07 --- Hey there! <span class="wave">👋</span> You may be wondering what I've been up to lately, unl...
unknown
unknown
--- title: Content enrichment tags: [updatelog] cover: paper-card excerpt: I've been working on new content authoring tools behind the scenes and I'm excited to share them with you! listed: false dateModified: 2025-05-07 --- Hey there! <span class="wave">👋</span> You may be wondering what I've been up to lately, unl...
--- title: Content enrichment tags: [updatelog] cover: paper-card excerpt: I've been working on new content authoring tools behind the scenes and I'm excited to share them with you! listed: false dateModified: 2025-05-07 --- Hey there! <span class="wave">👋</span> You may be wondering what I've been up to lately, unl...
code_snippets
b916c2b1-78ac-4067-9495-623bb35b793a
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250507-content-enrichment.md
unknown
13511fcb-c6b2-45bf-8f82-f44acff542b0
2
SemanticChunker@1.0.0
146d1b89fefe35b8ea1b07c9ac328f6950d40fb7ad7b94a01342bba358f0dff7
[Rich content authoring > Code highlighting] ## Code highlighting Up until a while ago, I was using **Prism** for code highlighting, but I found it to be a little restrictive in some aspects, while its highlighting wasn't perfect in some cases. Most websites nowadays use **Shiki**, so, naturally, I gave it a try and...
unknown
unknown
[Rich content authoring > Code highlighting] ## Code highlighting Up until a while ago, I was using **Prism** for code highlighting, but I found it to be a little restrictive in some aspects, while its highlighting wasn't perfect in some cases. Most websites nowadays use **Shiki**, so, naturally, I gave it a try and...
[Rich content authoring > Code highlighting] ## Code highlighting Up until a while ago, I was using **Prism** for code highlighting, but I found it to be a little restrictive in some aspects, while its highlighting wasn't perfect in some cases. Most websites nowadays use **Shiki**, so, naturally, I gave it a try and...
code_snippets
29aca87e-df40-4eb5-acf2-69f28b950bff
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250404-qol-improvements.md
unknown
764b1832-e95a-4fd7-b3b8-8442affb0756
2
SemanticChunker@1.0.0
158b6474a2f5e5afcbca00316f699a3c9931a1c43eded509ac23190c6bb69817
[New search > UI enhancements] ## UI enhancements On top of the new and improved search, I took the time to improve the **UI and interactions** a little bit. Pressing <kbd>⌘</kbd> or <kbd>Ctrl</kbd> will now show you three little **keyboard shortcuts** in the top right area, corresponding to the three main actions yo...
unknown
unknown
[New search > UI enhancements] ## UI enhancements On top of the new and improved search, I took the time to improve the **UI and interactions** a little bit. Pressing <kbd>⌘</kbd> or <kbd>Ctrl</kbd> will now show you three little **keyboard shortcuts** in the top right area, corresponding to the three main actions yo...
[New search > UI enhancements] ## UI enhancements On top of the new and improved search, I took the time to improve the **UI and interactions** a little bit. Pressing <kbd>⌘</kbd> or <kbd>Ctrl</kbd> will now show you three little **keyboard shortcuts** in the top right area, corresponding to the three main actions yo...
code_snippets
6465fb48-cdbe-4628-af72-4a5c6fc86769
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250404-qol-improvements.md
unknown
764b1832-e95a-4fd7-b3b8-8442affb0756
0
SemanticChunker@1.0.0
8c1287b4bce6ac352a6abcc04a6105239d9614296cc7ce0356c7fb3a920ff561
--- title: Quality of life improvements tags: [updatelog] cover: workspace-with-speaker excerpt: "New search, hotkeys, and more! Also: a clarification on community contributions." listed: false dateModified: 2025-04-04 --- Hello there! <span class="wave">👋</span> These past few weeks I've been deep in the weeds of t...
unknown
unknown
--- title: Quality of life improvements tags: [updatelog] cover: workspace-with-speaker excerpt: "New search, hotkeys, and more! Also: a clarification on community contributions." listed: false dateModified: 2025-04-04 --- Hello there! <span class="wave">👋</span> These past few weeks I've been deep in the weeds of t...
--- title: Quality of life improvements tags: [updatelog] cover: workspace-with-speaker excerpt: "New search, hotkeys, and more! Also: a clarification on community contributions." listed: false dateModified: 2025-04-04 --- Hello there! <span class="wave">👋</span> These past few weeks I've been deep in the weeds of t...
code_snippets
cb85ec30-525a-49aa-9e80-94d0de277c8e
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250404-qol-improvements.md
unknown
764b1832-e95a-4fd7-b3b8-8442affb0756
1
SemanticChunker@1.0.0
67fc58395b1450d2848c59b7faf6250fede6abdbfba2e55b8d772470cf4a5850
[New search] ## New search The previous search was an arbitrary mess of an implementation, and I was never really happy with it. I'm committed to building things on my own, but I also want things to be done right. The previous implementation was quite buggy at places and very bad at finding matches, as it only used a...
unknown
unknown
[New search] ## New search The previous search was an arbitrary mess of an implementation, and I was never really happy with it. I'm committed to building things on my own, but I also want things to be done right. The previous implementation was quite buggy at places and very bad at finding matches, as it only used a...
[New search] ## New search The previous search was an arbitrary mess of an implementation, and I was never really happy with it. I'm committed to building things on my own, but I also want things to be done right. The previous implementation was quite buggy at places and very bad at finding matches, as it only used a...
code_snippets
f550ab6f-d873-40b9-88dc-ce9396d40804
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/content/snippets/update-logs/s/250404-qol-improvements.md
unknown
764b1832-e95a-4fd7-b3b8-8442affb0756
3
SemanticChunker@1.0.0
bf1ebc330ecbeedecb67b890c168278c5b53fc33b0276633d4dddeac09d62b07
[New search > Community contributions] ## Community contributions **Community contributions are still closed** and will remain that way for the foreseeable future. I've explained why in the past (see [this post](/update-logs/s/231020-content-creator-vs-content-curator)), but I want to make a couple of clarifications ...
unknown
unknown
[New search > Community contributions] ## Community contributions **Community contributions are still closed** and will remain that way for the foreseeable future. I've explained why in the past (see [this post](/update-logs/s/231020-content-creator-vs-content-curator)), but I want to make a couple of clarifications ...
[New search > Community contributions] ## Community contributions **Community contributions are still closed** and will remain that way for the foreseeable future. I've explained why in the past (see [this post](/update-logs/s/231020-content-creator-vs-content-curator)), but I want to make a couple of clarifications ...
code_snippets
5baae30b-e9ae-48e8-8b7c-8721ffe70e27
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-map-foreach.md
unknown
7e7b8f1c-2c83-423b-b4fd-de7bb0a7f144
0
SemanticChunker@1.0.0
ad0088d277c28e9a5d4dd914752b29fafbefc35ad82a842d2660b4ac7cedc825
--- title: What is the difference between Array.prototype.map() and Array.prototype.forEach()? shortTitle: Array.prototype.map() vs Array.prototype.forEach() test: true language: javascript tags: [iteration,object] cover: fort-lamp excerpt: Which method do you reach for first? What are the differences between them? Let...
unknown
unknown
--- title: What is the difference between Array.prototype.map() and Array.prototype.forEach()? shortTitle: Array.prototype.map() vs Array.prototype.forEach() test: true language: javascript tags: [iteration,object] cover: fort-lamp excerpt: Which method do you reach for first? What are the differences between them? Let...
--- title: What is the difference between Array.prototype.map() and Array.prototype.forEach()? shortTitle: Array.prototype.map() vs Array.prototype.forEach() test: true language: javascript tags: [iteration,object] cover: fort-lamp excerpt: Which method do you reach for first? What are the differences between them? Let...
code_snippets
06a96206-7822-489c-a64f-b37e8e15f9a1
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-initialize.md
unknown
ab62784f-d39c-406d-9894-c455c7b5b9e3
1
SemanticChunker@1.0.0
b83bdabe4cfb9e61888b24f5fa44fdd1f472e3e22453f1fe3bcab3fb68293337
[Array() constructor] ## Array() constructor The first thing you'd reach for would probably be the `Array()` constructor. ```js const arr = Array(3); // [ , , ] - 3 empty slots arr.map(() => 1); // [ , , ] - map() skips empty slots arr.map((_, i) => i); // [ , , ] - map() skips empty slots arr[0]; // undefined - act...
unknown
unknown
[Array() constructor] ## Array() constructor The first thing you'd reach for would probably be the `Array()` constructor. ```js const arr = Array(3); // [ , , ] - 3 empty slots arr.map(() => 1); // [ , , ] - map() skips empty slots arr.map((_, i) => i); // [ , , ] - map() skips empty slots arr[0]; // undefined - act...
[Array() constructor] ## Array() constructor The first thing you'd reach for would probably be the `Array()` constructor. ```js const arr = Array(3); // [ , , ] - 3 empty slots arr.map(() => 1); // [ , , ] - map() skips empty slots arr.map((_, i) => i); // [ , , ] - map() skips empty slots arr[0]; // undefined - act...
code_snippets
4eb95a2c-2811-4aa0-94a6-5ec05db007f0
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-initialize.md
unknown
ab62784f-d39c-406d-9894-c455c7b5b9e3
2
SemanticChunker@1.0.0
b72e6fac76bf000ed55d8c447a5d455c33b6fc6364c16e1356f4218549e64a2a
[Array() constructor > Array.from()] ## Array.from() `Array.from()` is a static method that creates a new, shallow-copied Array instance from an **array-like or iterable object**. ```js const arr = Array.from({ length: 3 }); // [undefined, undefined, undefined] arr.map(() => 1); // [1, 1, 1] arr.map((_, i) => i); //...
unknown
unknown
[Array() constructor > Array.from()] ## Array.from() `Array.from()` is a static method that creates a new, shallow-copied Array instance from an **array-like or iterable object**. ```js const arr = Array.from({ length: 3 }); // [undefined, undefined, undefined] arr.map(() => 1); // [1, 1, 1] arr.map((_, i) => i); //...
[Array() constructor > Array.from()] ## Array.from() `Array.from()` is a static method that creates a new, shallow-copied Array instance from an **array-like or iterable object**. ```js const arr = Array.from({ length: 3 }); // [undefined, undefined, undefined] arr.map(() => 1); // [1, 1, 1] arr.map((_, i) => i); //...
code_snippets
c48a38ad-c788-434e-9754-3a75805cca20
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-initialize.md
unknown
ab62784f-d39c-406d-9894-c455c7b5b9e3
0
SemanticChunker@1.0.0
9410bb035961952e11b16dbb4d53f3f6087b9e16110954e1bd6d29af3ade1417
--- title: The many ways to initialize a JavaScript Array shortTitle: Array Initialization test: true language: javascript tags: [array] cover: red-mountain-range excerpt: Discover the inner workings of JavaScript arrays and learn about the different ways to initialize them. listed: true dateModified: 2023-06-18 --- I...
unknown
unknown
--- title: The many ways to initialize a JavaScript Array shortTitle: Array Initialization test: true language: javascript tags: [array] cover: red-mountain-range excerpt: Discover the inner workings of JavaScript arrays and learn about the different ways to initialize them. listed: true dateModified: 2023-06-18 --- I...
--- title: The many ways to initialize a JavaScript Array shortTitle: Array Initialization test: true language: javascript tags: [array] cover: red-mountain-range excerpt: Discover the inner workings of JavaScript arrays and learn about the different ways to initialize them. listed: true dateModified: 2023-06-18 --- I...
code_snippets
d6d32383-1816-4935-bd50-6a82415734b0
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-initialize.md
unknown
ab62784f-d39c-406d-9894-c455c7b5b9e3
3
SemanticChunker@1.0.0
40c919b683f8996d6f791d9bfcd53a055b2d72e72892c06c753fe0ef1c6be9d7
[Array() constructor > Array.prototype.fill()] ## Array.prototype.fill() While `Array.from()` is quite flexible, using a mapping function to fill it with the same value isn't particularly efficient, so use `Array.prototype.fill()`. ```js const nullArr = new Array(3).fill(null); // [null, null, null] const staticArr ...
unknown
unknown
[Array() constructor > Array.prototype.fill()] ## Array.prototype.fill() While `Array.from()` is quite flexible, using a mapping function to fill it with the same value isn't particularly efficient, so use `Array.prototype.fill()`. ```js const nullArr = new Array(3).fill(null); // [null, null, null] const staticArr ...
[Array() constructor > Array.prototype.fill()] ## Array.prototype.fill() While `Array.from()` is quite flexible, using a mapping function to fill it with the same value isn't particularly efficient, so use `Array.prototype.fill()`. ```js const nullArr = new Array(3).fill(null); // [null, null, null] const staticArr ...
code_snippets
e23e7c3a-b6bc-430a-bb27-5182cd4f4c8b
unknown
file:///home/sanjeev/Downloads/depthapi/datasets/30-seconds-of-code/spec/fixtures/content/snippets/js/s/array-grouping.md
unknown
319addcf-3cf7-4ec2-8fb0-bb027b6194de
0
SemanticChunker@1.0.0
3e2d8b6e4cd56358b8d693f7722e4f3377f7de9732a3cb3ae1872dbdd5894e27
--- title: Group array elements test: true language: javascript tags: [array,object] cover: man-cup-laptop excerpt: Groups the elements of an array based on the given function. listed: true dateModified: 2020-10-22 --- Groups the elements of an array based on the given function. - Use `Array.prototype.map()` to map t...
unknown
unknown
--- title: Group array elements test: true language: javascript tags: [array,object] cover: man-cup-laptop excerpt: Groups the elements of an array based on the given function. listed: true dateModified: 2020-10-22 --- Groups the elements of an array based on the given function. - Use `Array.prototype.map()` to map t...
--- title: Group array elements test: true language: javascript tags: [array,object] cover: man-cup-laptop excerpt: Groups the elements of an array based on the given function. listed: true dateModified: 2020-10-22 --- Groups the elements of an array based on the given function. - Use `Array.prototype.map()` to map t...
code_snippets