Issue prefixed, high-entropy keys (lac_live_…), store only the SHA-256 hash, show the last 4, and verify in constant time — exactly how Stripe/GitHub-style keys work.
Install
$ npm install @lacspace/apikey
Quick example
@lacspace/apikeyts
await verifyApiKey(key, storedHash)
Returns true / false
Tips
Zero-dependency and isomorphic — safe to import on the server, in the browser, on the edge and in React Native. It tree-shakes, so you only ship what you import.