JSTools Weekly — ✨2023#8: TS-Reset: A ‘CSS reset’ For TS, Improving JS Types

jstoolsweekly

JSTools Weekly

Posted on March 1, 2023

JSTools Weekly — ✨2023#8: TS-Reset: A ‘CSS reset’ For TS, Improving JS Types

Hi JS developers👋
JSTools Weekly newsletter, issue 2023#8 (top new JS releases) just released.

new JS tools, issue 2023#8

ts-reset: A 'CSS reset' for TypeScript, improving types for common JavaScript API's

With ts-reset:

  • 👍 .json (in fetch) and JSON.parse both return unknown

  • .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
  });
Enter fullscreen mode Exit fullscreen mode

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
}
Enter fullscreen mode Exit fullscreen mode

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 and ActionData - 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.

See full list of new javascript tools

💖 💪 🙅 🚩
jstoolsweekly
JSTools Weekly

Posted on March 1, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related