Hi JS developers👋
JSTools Weekly newsletter, issue 2023#8 (top new JS releases) just released.
ts-reset: A 'CSS reset' for TypeScript, improving types for common JavaScript API's
With ts-reset
:
👍
.json
(infetch
) andJSON.parse
both returnunknown
✅
.filter(Boolean)
behaves EXACTLY how you expect🥹
array.includes
is widened to be more ergonomic🚀 And several more changes!
// Import in a single file, then across your whole project...
import "@total-typescript/ts-reset";
// .filter just got smarter!
const filteredArray = [1, 2, undefined].filter(Boolean); // number[]
// Get rid of the any's in JSON.parse and fetch
const result = JSON.parse("{}"); // unknown
fetch("/")
.then((res) => res.json())
.then((json) => {
console.log(json); // unknown
});
sonner: An opinionated toast component for React.
bling: 💍 Framework agnostic transpilation utilities for client/server RPCs, env isolation, islands, module splitting, and more.
garph: A tRPC-like schema-builder for GraphQL
picorpc: A tiny RPC library and spec, inspired by JSON-RPC 2.0 and tRPC.
yal: Yal (Yet Another Launcher) is a launcher app similar to Alfred, Raycast, ScriptKit, Spotlight, and many others.
suspense: Utilities for working with React Suspense
nuxt-scheduler: Create scheduled jobs with human readable time settings
import { useScheduler } from "#scheduler";
import say from "~/server/app/services/say";
export default function startScheduler() {
const scheduler = useScheduler();
scheduler.run(() => {
say("this should run every 5 seconds");
}).everySeconds(5);
// create as many jobs as you want here
}
minds: MindsJS - Build AI powered workflows easily
aifiles: A CLI that organize and manage your files using AI
Organize audio, video, pictures, documents, archives, and other types of files
Automatically extract relevant information from your files using OpenAI ChatGPT.
Automatically add tag and comments to the file
Organize your files into categories and directories based on their content
Rename your files using a customizable naming convention
Store your files in a designated directory
sveltekit-superforms: Supercharge your SvelteKit forms with this powerhouse of a library!
Merging
PageData
andActionData
- Stop worrying about which one to use and how, just focus on your data.Server-side data validation using Zod, with output that can be used directly on the client.
Auto-centering and auto-focusing on invalid form fields.
Tainted form detection, prevents the user from losing data if navigating away from an unsaved form.
No JS required as default, but full support for progressive enhancement.
Automatically coerces the string data from
FormData
into correct types.For advanced data structures, forget about the limitations of
FormData
- Send your forms as devalued JSON, transparently.and more
nuxt-medusa: 🛍️ Medusa module for Nuxt
Nuxt 3 ready
Wrapper around
@medusajs/medusa-js
Handy composables like
useMedusaClient
Usage in API server routes with
serverMedusaClient
TypeScript support
ts-async-kit: the easiest API to deal with promises in Typescript. Currently, ↩️ Retrying 🏃♂️ looping & 😴 sleeping
concurrent.js: Easy Multithreading for JavaScript (Node.js, Deno & Browser)
Has no runtime dependency.
Built with Node.js and uses the ECMAScript module system.
Alters nothing, no native nor programmer-defined.
Written in TypeScript with the strictest ESNext config.
Provides a strongly-typed syntax.
Built upon web workers (a.k.a. worker threads).
Creates a worker once and reuses it.
Automatically cleans up a worker's memory.
Automatically creates and terminates workers (scale up/down).
Packaged as platform-specific bundles that target ES2020.
Top comments (0)