---
title: "Using TensorFlow.js to check for naughty content client-side"
publication: "JavaScript Weekly"
issue: 425
published_at: "2019-02-22"
canonical_url: "https://javascriptweekly.com/issues/425"
---

This week's JavaScript news       

#425 — February 22, 2019 

[Read on the Web](https://javascriptweekly.com/issues/425)   

JavaScript Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/fkwfiatc1gopfuieijt3.jpg)](https://shift.infinite.red/avoid-nightmares-nsfw-js-ab7b176978b1)   

[NSFW JS: A Way to Check for Undesirable Images Client-Side](https://shift.infinite.red/avoid-nightmares-nsfw-js-ab7b176978b1) — Billed as ‘client-side indecent content checking for the soul’, this is an interesting, though imperfect, way to screen content prior to upload. It uses TensorFlow.js behind the scenes. [Demo here.](https://nsfwjs.com/) 

Gant Laborde   

[JavaScript Loading Priorities in Chrome](https://addyosmani.com/blog/script-priorities/) — How browsers schedule and execute scripts can impact the performance of your pages. Addy Osmani compares the different approaches here. 

Addy Osmani   [![\](https://copm.s3.amazonaws.com/9b46e993.png)](https://slackfrontiers.com/?utm_medium=email&utm_source=cooperpress&utm_campaign=fy20q102-slackapi-frontiers) 

[Frontiers 2019: Explore New Ways to Build Apps on Slack](https://slackfrontiers.com/?utm_medium=email&utm_source=cooperpress&utm_campaign=fy20q102-slackapi-frontiers) — Teams move faster with apps on Slack. And, it wouldn’t be possible without the people who built them. Connect with app builders like you, get hands-on training and spark new ideas at Frontiers 2019. 

Slack sponsor   

[TypeScript Linter TSLint to Give Way to ESLint](https://medium.com/palantir/tslint-in-2019-1a144c2317a9) — The developers of [TSLint](https://palantir.github.io/tslint/), the TypeScript linter, have decided to deprecate it and focus on improving TypeScript support in the popular [ESLint](https://eslint.org/) linter instead. This will greatly help existing ESLint users who are picking up TypeScript. 

Palantir   

[CodeCrumbs: Document Codebases by Adding 'Breadcrumbs'](https://github.com/Bogdan-Lyashenko/codecrumbs) — One of those things that’s better to [see visually](https://codecrumbs.io/) than read about. Essentially you annotate your code in a certain way and it can produce visualizations of how your codebase works. 

Bohdan Liashenko   

[Ionic React Now Available in Beta](https://blog.ionicframework.com/announcing-the-ionic-react-beta/) — Ionic, a framework for building cross-platform hybrid mobile apps, is commonly associated with Angular but now it’s available in a React flavor too with around 70 components intended to cover the main use cases when building mobile apps. _(This item comes via our [mobile developer newsletter](https://mobiledevweekly.com/?utm_source=jsw&utm_medium=email&utm_campaign=cross_promo&utm_content=425))_. 

Josh Thomas (Ionic)  

💻 Jobs  

[Sr. Fullstack Engineer (Remote)](https://www.stickermule.com/careers) — Sticker Mule is looking for passionate developers to join our remote team. Come help us become the Internet’s best place to shop and work. 

Sticker Mule   

[React/TypeScript Dev (Berlin, Germany)](https://remerge.recruitee.com/o/frontend-javascript-developer) — Build the tools behind the world’s leading app retargeting platform. Make your own decisions. Solve hard, real-world problems with a cutting edge stack in an experienced & ambitious team. 

Remerge   

[Find a Job Through Vettery](https://www.vettery.com/tech?utm_source=newsletter&utm_medium=cooper-javascriptweekly&utm_term=tech&utm_content=grouped&utm_campaign=ad-77584) — Vettery specializes in developer roles and is completely free for job seekers. 

Vettery  

📘 Articles, Tutorials and Opinions  

[`for` vs `forEach()` vs `for`/`in` vs `for`/`of`](http://thecodebarbarian.com/for-vs-for-each-vs-for-in-vs-for-of-in-javascript.html) — An overview of the difference between these looping constructs using several different edge cases. 

Valeri Karpov   

[JSConf US & The Expanding Web](https://www.bignerdranch.com/blog/jsconf-us-and-the-expanding-web/) — Check out a recent blog by Anna Sedlar. 

Big Nerd Ranch sponsor   

[Using Fastify and Preact for Quick Web App Prototyping](https://loige.co/fastify-and-preact-for-quick-web-app-prototyping/) — Two technologies we haven’t mentioned for quite a while come together here in building a simple full-stack app. 

Luciano Mammino   

[Styling an Angular Application with Bootstrap](https://www.smashingmagazine.com/2019/02/angular-application-bootstrap/) — A tutorial using the latest versions of Bootstrap 4 and Angular 7. 

Smashing Magazine   

[Working with TypeScript in Visual Studio Code](https://scotch.io/tutorials/working-with-typescript-in-visual-studio-code) — Since VS Code and TypeScript both originated at Microsoft, it’s no surprise they work well together. 

James Quick beginner   

[How to Disallow Large Imports from JavaScript Projects](https://addyosmani.com/blog/disallow-imports/) — Are there known large dependencies your team wish they could disallow from a project? ESLint supports disallowing specific imports. 

Addy Osmani   

[Replace Tedious Coding with MongoDB Stitch and Public APIs](https://www.mongodb.com/blog/post/replace-tedious-coding-with-mongodb-stitch-and-public-apis?jmp=cpress&utm_campaign=WW_CP_newsletter_sponsorship&utm_content=20190222&utm_medium=display&utm_source=javascriptweekly) 

MongoDB sponsor   

['We Migrated to Next.js to Serve Our Home Page 7.5× Faster'](https://www.manifold.co/blog/we-migrated-to-next-js-to-serve-our-home-page-7-5-faster-559443219c84) — Going from a basic React boilerplate to Next.js can yield serious initial render time improvements and without much work, too. 

Drew Powers (Manifold)   

[Faster Calls with Arguments Mismatch](https://bitly.com/v8-faster-calls-with-arguments-mismatch) — Technical notes on a special V8 optimization for situations where you have strict mode functions that don’t use the `arguments` object or rest parameters. The performance improvement can be significant. 

Benedikt Meurer and Toon Verwaest (V8)  

🔧 Code and Tools  

[VS Code Settings and Extensions for Faster JS Development](http://tilomitra.com/vs-code-settings-and-extensions-for-faster-javascript-development/) 

Tilo Mitra   

[Cryption: In-Browser AES File Encryption with Data Integrity Check](https://github.com/lagmoellertim/cryption/) — It’s limited as to the size of data it can work with, however, but is an interesting project. 

Tim-Luca Lagmöller   

[Supercharge Your Code, Test, Debug Feedback Loop](https://wallabyjs.com/?utm_source=javascriptweekly&utm_medium=sponsored_newsletter&utm_campaign=javascriptweekly&utm_content=javascriptweekly) — Wallaby runs unit tests as you type and reports results right beside your code in your text editor. 

Wallaby.js sponsor   

[SimpleFS: Handle Files in IndexedDB Like You Would in Node](https://github.com/fagbokforlaget/simple-fs) — Node-style file operations for files stored in IndexedDB. 

Fagbokforlaget V&B AS   

[Cleave.js: Format Input Text Content While Typing](https://nosir.github.io/cleave.js/) — Ideal for things like phone numbers, credit card numbers, dates.. or define your own. 

Max Huang   

[Howler.js: An Audio Library for the Modern Web](https://howlerjs.com/) — Get a simple API for your audio needs across all platforms. No dependencies, too. 

James Simpson   

[A JavaScript-Interop Library for ClojureScript](https://github.com/appliedsciencestudio/js-interop) 

Applied Science Studio         

Curated by [Cooperpress](https://cooperpress.com/) and [Peter Cooper](https://twitter.com/peterc) 

'JavaScript' is a trademark of Oracle Corporation in the US
We are not endorsed by or affiliated with Oracle. 

[Change your email address](https://javascriptweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://javascriptweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
