The new version of YourJS

A JavaScript library that's all yours.

MyJS is a small, well-documented utility library for JavaScript, and the new version of YourJS. Pick just the parts you need and download them as a script or an ES module, ready for the browser or Node.

myjs-example.js
// Type checking that goes beyond typeof
MyJS.typeOf([3, 6, 2]);    // "Array"
MyJS.typeOf(/^[aeiou]/i);  // "RegExp"
MyJS.typeOf(null);         // "Null"
MyJS.typeOf(async () => {}); // "AsyncFunction"

// Can it be a variable's name?
MyJS.isValidVarName('café');      // true
MyJS.isValidVarName('2fast');     // false
MyJS.isValidVarName('let', true); // false in strict code

Pick what you need

Choose the parts your project uses on the download page. Anything they need comes along automatically, and nothing else does.

Well documented

Every part has docs and examples you can run right on the page, and each download can come with its docs too.

Script or module

Get one script that adds a single global (MyJS, or a name you choose) or an ES module, plain or minified with source maps.

Try it right here

MyJS Pad: a JavaScript console for any page

Add an interactive console to a page with one script tag. Press Run (or Ctrl/⌘+Enter) to run the code one block at a time, click values to expand them, and change the code to try your own.

See MyJS Pad

Follow along as MyJS grows

The blog has news about the library, along with JavaScript tips, tricks and deep dives.

Go to the blog