box.js #javascript #security

An utility to analyze malicious JavaScript. By Capacitor Set.



5 #JavaScript “Bad” Parts That Are Fixed In #ES6

ECMAScript 6 (ES6) features can be divided into features that are pure syntactic sugar (like: class), features that enhance JavaScript (like import) and features that fix some of JavaScript’s “bad” parts (like the let keyword). Most blogs and articles combine all three types, and can overwhelm newcomers.


Understanding #Laravel Middleware

HTTP Middlewares provide a convenient mechanism for filtering HTTP requests entering your application. Laravel, for example, has a middleware for verifying a user’s authentication.

Some Middleware Use-Cases

  • Using a middleware to confirm the incoming route request API key. Assuming you are building an API.
  • Rate-limiting a service call.
  • Change the site language based on locale.
  • Enable site-wide maintenance.
  • Sniffing bot traffic.
  • Logging.


JavaScript Rounding

Very often calculations in javascript produce results that don’t quite fall within the ranges we want, or generate numbers that need to be “cleaned up” before use. Exactly what happens to those numbers – rounding up or down, set within a range, or being “clipped” to a certain number of decimal places – depends on what you want to use them for.