frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Tspo: A zero-dependency TypeScript utility library for plain-object workflows

https://github.com/seanpmaxwell/tspo
1•spmaxwell7•1h ago

Comments

spmaxwell7•1h ago
Hey all, I just released tspo and wanted to share it for feedback.

It’s a small utility library focused on plain-objects, with runtime checks and strong TS inference in the same API. I love TypeScript but the reason I created this is because there many situations where I have to operate outside the safety of the type system and I got tired of constantly having to hard caste my objects to some other type. Additionally, when creating derived object-types I almost always use merge/spread operations but on rare occasions I wanted to avoid ending up with long lists of unused variables or needing multiple lines of code to build new objects from the properties of another (which you can do with `tspo`'s builder functions).

Here are some examples of those situations:

Using a key for an object when the key is dynamic. TypeScript would give `type string cannot be used to index type ...`

Constructing objects of the same or similar type but with bad values for unit-testing so I can verify validation is working.

Create a new object from just a few properties on a larger object.

Snippet:

import tspo from 'tspo';

const user = { id: 1, name: 'Ada' } as const; const out = tspo.safeIndex(user, someDynamicKey); // 'id' | 'name' What it includes:

Accessors/guards: index, safeIndex, reverseIndex, safeReverseIndex, is, isKey, isValue

Object builders: omit, pick, merge, mergeArray, addEntry, addEntries

Object updaters: append, remove

Utilities: copy, compare, iterate

I’d really appreciate feedback on:

API naming edge case

Additional features

Show HN: Giving Claude Code persistent memory with a self-hosted MCP server

https://github.com/elvismdev/mem0-mcp-selfhosted
1•elvismdev•33s ago•0 comments

Six Years of Pluralistic

https://pluralistic.net/2026/02/19/now-we-are-six/
1•leotravis10•57s ago•0 comments

We Dumped GitHub into DuckLake, Here's What We Found

https://research.powerset.co/posts/github-in-2025
2•meta87•1m ago•0 comments

Red blood cells soak up sugar at high altitude, protecting against diabetes

https://medicalxpress.com/news/2026-02-red-blood-cells-sugar-high.html
1•bikenaga•1m ago•0 comments

Asbestos is a bigger problem than we thought [video]

https://www.youtube.com/watch?v=cMx139eTxoc
1•lisper•1m ago•0 comments

Deep UV ultrashort laser pulses for precise ablation of soft biological tissue

https://opg.optica.org/captcha/(S(i1vawnmvqsscndqs42phxdls))/?guid=67BC469C-1968-4ADF-9205-D3AC8D...
1•PaulHoule•2m ago•0 comments

It's time to get rid of networked cameras

https://buttondown.com/creativegood/archive/its-time-to-get-rid-of-networked-cameras/
1•leotravis10•2m ago•0 comments

OpenClaw Is the Canary in the Coalmine

https://www.osohq.com/post/the-clawbot-moltbot-openclaw-problem
1•meghan•2m ago•0 comments

Musk cuts Starlink access for Russian forces giving Ukraine an edge at the front

https://www.bbc.com/news/articles/c0q3ndj7052o
1•MilnerRoute•2m ago•0 comments

YouTube Blocks Background Listening Workaround for Free Users

https://www.pcmag.com/news/youtube-blocks-background-listening-workaround-for-free-users
1•ripe•2m ago•0 comments

Roblox sued by L.A. County for allegedly failing to protect children

https://ktla.com/news/local-news/roblox-lawsuit-los-angeles-county/
1•Bender•3m ago•0 comments

MediaSymetric Market is running a contest

1•anarhackist•3m ago•0 comments

Google blocked over 1.75M Play Store app submissions in 2025

https://www.bleepingcomputer.com/news/security/google-blocked-over-175-million-play-store-app-sub...
2•speckx•4m ago•0 comments

Roman slavery and American slavery – how were they different?

https://beardyhistory.com/2018/01/01/roman-slavery-and-american-slavery-differences/
2•thisislife2•4m ago•0 comments

Beagle SCM: the continuous commit model (a.k.a. undo/redo)

https://replicated.wiki/blog/partII.html
1•gritzko•4m ago•0 comments

Squashed skulls found in China belong to first known East Asians

https://www.science.org/content/article/squashed-skulls-found-china-belong-first-known-east-asians
2•bikenaga•5m ago•0 comments

Show HN: Matrix OS – An AI operating system where Claude is the kernel

https://matrix-os.com/
3•hamedmp•6m ago•1 comments

I'm Sorry to Burst Your Bubble: You Are Being Fooled About AI

https://davidwsilva.substack.com/p/im-sorry-to-burst-your-bubble-you
2•t23•6m ago•0 comments

Denser Retriever: Semantic Search and Document Retrieval

https://retriever.denser.ai
1•zhiheng_huang•7m ago•0 comments

Chris Lattner on Claude C Compiler

https://twitter.com/clattner_llvm/status/2024564314347360272
1•tosh•8m ago•0 comments

I Built an Automated Art Business with AI Then Realized It Was a Terrible Idea

https://www.youtube.com/watch?v=_g2WjXqGmps
1•nipponese•9m ago•0 comments

PageData – URL intelligence API (metadata, tech stack, DNS, SSL in one call)

https://pagedata.dev/
1•jendrypto•10m ago•0 comments

Co-Alegebraic Chat Bots in Haskell [Not AI]

https://github.com/cofree-coffee/cofree-bot
2•solomonb•12m ago•1 comments

Hubble, Euclid and Subaru uncover dark galaxy

https://www.esa.int/Science_Exploration/Space_Science/Hubble_Euclid_Subaru_uncover_dark_galaxy
1•Eduard•12m ago•0 comments

Don't Use Next.js If You're Building for the Long Term

https://audits.blockhacks.io/audit/dont-use-nextjs-long-term
2•block_hacks•13m ago•3 comments

Chrome Extension That Shows Your Real TikTok Shop Profit

https://chromewebstore.google.com/detail/tiktok-seller-dashboard-e/eaakkcfeahbcoodphgeiepegpblaoebh
1•yellowsunhy•13m ago•1 comments

Concrete Syntax Matters

https://www.youtube.com/watch?v=kQjrcSMYpaA
1•todsacerdoti•14m ago•0 comments

Show HN: I built Pixie to help parents employee their kids and fund retirement

https://trypixie.com/?q=hn
2•popupeyecare•15m ago•0 comments

"The Duck and the DataFrame: A Data Engineer's Journey with DuckDB" PyCon AU2025 [video]

https://www.youtube.com/watch?v=PaX6T6IbjTE
1•boshomi•16m ago•0 comments

IRS lost 40% of IT staff, 80% of tech leaders in 'efficiency' shakeup

https://www.theregister.com/2026/02/19/irs_job_cuts/
6•freitasm•17m ago•0 comments