Fernando Muñoz · , Frontend Tech Lead · Madrid

NM-012 · C60

js-subtype

npm library · 2024

“More precise than typeof.”

Side A

  1. A small, zero-dependency library that tells you the exact subtype of any JavaScript value —Array, Date, Map, RegExp…— where typeof only says “object”.

  2. It exposes a single function, getType, which returns the subtype’s name, handy to validate input precisely or decide how to handle a value. It works in Node.js and in modern browsers, installs from npm or yarn and is MIT licensed.

Side B

  1. Facts

    Technologies
    JavaScript · Node.js
    Status
    Repository
    Date
    2024
  2. Links

See it on the cassette

More tapes

Other projects in the portfolio