Copy
What a Tool!

Issue #333 • December 5, 2019

Advertisement
Get Your .TECH Domain Starting at $9.99 / Year
Use coupon codes TECHNOW or TECH999 for major discounts on .TECH domains for 1, 3, or 5 year domain registrations.
Search for Your .TECH Domain Now
.TECH Domains

This week I stumbled across the Object.preventExtensions() method, which is very straightforward to use. The method prevents you from adding new properties to an object. For example:

'use strict';

let myObj = {
  one: 1,
  two: 2
};

console.log(myObj.one); // 1
console.log(myObj.two); // 2

Object.preventExtensions(myObj);

try {
  myObj.three = 3;
} catch (e) {
  console.log(e.message);
  // "Cannot add property three, object is not extensible" }

console.log(myObj.three); // undefined

Try it on CodePen

As you can see, adding the first two properties to the object is not a problem. But after calling Object.preventExtensions() on the object, the next property I try to add fails.

In strict mode (as above), the browser will throw the error shown in the catch block. I'm using the try/catch construct to log the message so it shows in CodePen's console and doesn't interrupt the code. In non-strict mode, the attempt will just fail silently.

A couple of things to note about this method:

  • You can still delete properties, unlike when using Object.freeze().
  • This prevents addition of own properties, but you can still add to the object's prototype (see the last section of code in the above demo)
More on this method on MDN's article.


Now on to this week's tools!
 

Text Editors, IDEs, etc.

Get Your .TECH Domain Starting at $9.99 / Year
Use coupon codes TECHNOW or TECH999 for major discounts on .TECH domains for 1, 3, or 5 year domain registrations.   Sponsored  

Headwind
An opinionated Tailwind CSS class sorter for VSCode. It enforces consistent ordering of classes by parsing your code and reprinting class names to follow a given order.

WebGLStudio.js
A platform to create interactive 3D scenes directly in the browser. Allows you to edit the scene visually, code your behaviours, edit the shaders, all directly from within the app.

Tenko REPL
An 100% spec compliant ES2020 JavaScript parser written in JavaScript.

CodeSandbox for VSCode
VSCode extension that brings CodeSandbox into your favorite editor, allowing you to create and edit apps on CodeSandbox right from VSCode.

Visual Studio Online
A cloud-powered fully-configured development environment accessible from anywhere.

Theia
A cloud and desktop IDE framework implemented in TypeScript.

Yoncé
A Beyoncé-inspired theme for Bash-It, VSCode, iTerm, Slack, Alfred.

Design System Playground
Play with typography and colors to generate a design system theme you can use in your projects.

vim-todo
Better TODO manager plugin for Neovim and Vim.

JavaScript Libraries and Frameworks

JavaScript for Beginners (Video Course)
50% off during course launch! A fun, exercise heavy approach to learning Modern JavaScript from scratch. This might be Wes Bos's best course yet!  promoted

CanJS
Now at version 6+. A collection of client-side JavaScript architectural libraries to build CRUD apps in fewer lines of code.

Preact
Now at version X. A fast 3kB alternative to React with the same modern API.

GSAP
The popular JavaScript animation library is now at version 3.

Imbue.js
Designed to replace some of the core features of jQuery, and provide a limited set of useful shortcuts and extensions on top of the standard NodeList, HTMLElement, HTMLDocument, and Array prototypes.

Relay
Now at version 7+. A JavaScript framework for building data-driven React applications.

CONNECTIVE
Facilitates large-scale reactive programming in JavaScript/TypeScript. It enables declarative creation of large and complex data/event flows and encourages reuse of flows.

Feathers
Now at version 4+. A web framework for creating real-time applications and REST APIs using JavaScript or TypeScript with Node, React Native, and the browser.

GPU.js
GPU accelerated JavaScript. A library that automatically transpiles simple JavaScript functions into shader language and compiles them so they run on your GPU.

Sinuous
A small, blazing fast, reactive UI library. Provides the clarity of declarative views and the performance of direct DOM manipulation.

Node.js
Now at version 13+. JavaScript runtime for building scalable applications.

The Uncategorizables

JavaScript for Beginners (Video Course)
50% off during course launch! A fun, exercise heavy approach to learning Modern JavaScript from scratch. This might be Wes Bos's best course yet!  promoted

Beagle Security
A one-stop web application security testing solution to keep your data and website secure from cyber attacks.

Antora
A multi-repository documentation site generator for tech writers who write in AsciiDoc.

xs:code
A monetization platform for open source projects. Offer paid subscriptions to access your code, while keeping it open source.

ClickHelp
Create and publish user manuals, FAQs, tutorials, knowledge bases, all in a single web portal.

Browserosaurus
A macOS app that gives you a "browser prompter" so you can choose which browser to open a link in (useful for testing).

Postwoman
API request builder. A free, fast, and beautiful alternative to Postman.

ReSpec
A JavaScript library that makes it easier to write technical specifications, or documents that tend to be technical in nature.

Chatwoot
A simple and elegant live chat software. An open source alternative to Intercom, Zendesk, Drift, Crisp, etc.

AutoSSL
Hassle-free SSL for SaaS providers. Helps SaaS companies serve their customers' vanity domains over HTTPS.

A Tweet for Thought

Anil Dash with a reminder that not everything we build needs to be a startup.
 

Send Me Your Tools!

Made something? Send links via Direct Message on Twitter @WebToolsWeekly (details here). No tutorials or articles, please. If you have any suggestions for improvement or corrections, feel free to reply to this email.
 

Before I Go...

In the category of strange app ideas, Die With Me is an iOS chat app that only works if your device's battery is below 5%.

Thanks to everyone for subscribing and reading!

Keep tooling,
Louis
webtoolsweekly.com
@WebToolsWeekly
PayPal.me/WebToolsWeekly