
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
picoassert
Advanced tools
Perhaps the smallest Javascript assertion module
picoassert is a 113-byte Javascript assertion module based on
nanoassert.
var assert = require("picoassert")
assert.eq(a, b, `${a} == ${b}`); // Asserts `a` and `b` are equal.
assert.neq(a, b, `${a} != ${b}`); // Asserts `a` and `b` are not equal.
assert.is(a, `(!!${a}) === true`); // Asserts `a` is truthy.
The nanoassert repository README describes the author's complaint about the
excessive size of the assert module,
the standard assertion library. However, even the nanoassert library was
unnecessarily large, which led to the creation of picoassert.
This library is also an open golf challenge. Please feel free to submit pull requests if you're able to shorten the code!
npm install picoassert
The picoassert library can be imported via unpkg as shown below:
<script type="application/javascript">var module={};</script>
<script src="https://unpkg.com/picoassert/index.js"></script>
<script type="application/javascript">
var assert = module.exports;
// Library is imported as `assert`!
</script>
Be aware that picoassert is a CommonJS module and therefore uses
module.exports; before importing the script, you will need to define module
or use a CommonJS-compatible module loader.
Please see the LICENSE file for license information.
FAQs
Tiny Javascript assertion library
We found that picoassert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.