All About Recursion, PTC, TCO and STC in JavaScript 8th of May, 2017 — Lucas Fernandes da Costa at Florianópolis, Brazil🇧🇷 Recently everyone seems to be really excited about functional programming and its concepts. However, many people don't talk about recursion and, especially, about proper tail calls, which is really important when it comes to writing clean and concise code without exploding t
Even though ES6 (ES2015) brought modules to the language, it missed one important thing - a loading method. Proper support is currently being implemented for browsers↗. To learn more about the topic, I’m interviewing Bradley Farias↗. # I am a Software Engineer at GoDaddy these days but have been at several startups before that. My childhood was mostly running around outside in the Texas heat and e
The Many Faces of Functions in JavaScriptPosted by Leo Balter If you’ve had any contact with JavaScript code, you’re probably very familiar with how to define and call functions, but are you aware of of how many different ways you can define a function? This is a common challenge of writing and maintaining tests in Test262—especially when a new feature comes into contact with any existing function
Update 2018-12-20: Warning: This blog post is outdated! Consult “ECMAScript modules in Node.js: the new plan” for the latest information. Update 2017-05-11: Complete rewrite of Sect. “Why a new filename extension for ES modules?”. This blog post describes how module specifiers (the path-like IDs of modules) change with ECMAScript modules (ESM). There are a few subtle differences, compared to the f
ES6 modules are now supported in Chrome, from 61 onwards—they also work in older versions, but you’ll have to enable the Experimental Web Platform flag in chrome:flags. Chrome now joins many other modern browsers which also include support, some behind flags. 🚩 Modules are an important part of building any web application which comprises more than trivial script. The JavaScript community has deve
Usage: eslump [options] or: eslump TEST_FILE OUTPUT_DIR [options] Options: --max-depth Number The maximum depth of the random JavaScript. - default: 7 --source-type String Parsing mode. - either: module or script - default: module --whitespace Randomize the whitespace in the random JavaScript. --comments Insert random comments into the random JavaScript. -r, --reproduce Reproduce a previous error
In this course we will learn how to use the ES2017 async and await keywords to write asynchronous code that is more readable and easier to follow than equivalent code based on long promise chains or deeply nested callbacks. The await operator takes a promise and then pauses the function execution until that promise is settled which allows for an async function to read like sequential synchronous c
*Prepack is still in an early development stage and not ready for production use just yet. Please try it out, give feedback, and help fix bugs. What does it do? Prepack is a tool that optimizes JavaScript source code: Computations that can be done at compile-time instead of run-time get eliminated. Prepack replaces the global code of a JavaScript bundle with equivalent code that is a simple sequen
ES modules are now available in browsers! They're in… Safari 10.1. Chrome 61. Firefox 60. Edge 16. <script type="module"> import { addTextToBody } from './utils.mjs'; addTextToBody('Modules are pretty cool.'); </script> // utils.mjs export function addTextToBody(text) { const div = document.createElement('div'); div.textContent = text; document.body.appendChild(div); } Live demo. All you need is t
Update 2019-01-29: The following new Array methods were just added to ECMAScript 2019 (based on a proposal by Michael Ficarra, Brian Terlson, Mathias Bynens): The new Array method .flatMap() is equivalent to the function flatMap() described in this blog post. The new Array method .flat() is equivalent to the function flatten() described in this blog post. In this blog post, we look at the operatio
Streaming fetches are supported in Chrome, Edge, and Safari, and they look a little like this: async function getResponseSize(url) { const response = await fetch(url); const reader = response.body.getReader(); let total = 0; while (true) { const { done, value } = await reader.read(); if (done) return total; total += value.length; } } This code is pretty readable thanks to async functions (here's a
In my previous post, I discussed things that could be fixed in JavaScript’s date implementation – if we wanted to. In this post, I’ll discuss things that can’t be fixed – no matter how much we want them to be. No Semantic Versioning Here! Most developers are familiar with Semantic versioning, or semver. In semver, we have the idea of three kinds of release: Patch – releases that fix bugs only Mino
In this article we’ll take a look at regular expressions in and after ES6. There’s a couple of regular expressions flags which were introduced in ES6: the /y or sticky flag, and the /u or Unicode flag. Then we’ll discuss five proposals which are making their way through the ECMAScript specification development process at TC39. Sticky Matching Flag /y The sticky matching y flag introduced in ES6 is
Async/await in Node.js opens up a host of powerful design patterns. Tasks that used to take complex libraries or intricate promise chaining can now be done with rudimentary if statements and for loops. I already wrote about these kind of design patterns with co, but async/await makes these patterns accessible in vanilla Node.js, no outside libraries required. Retrying Failed Requests The power of
ECMAScript® 2017 Language Specificationをアプリとして開けるWebViewアプリです。 ECMAScript仕様書アプリhttps://t.co/twhhFqPca8 pic.twitter.com/bs2onkxNDo — azu (@azu_re) February 23, 2017 Electron製なのでどのプラットフォームでも動くと思います。 作り方 nativefierを入れます。 サイト内検索をするin-site-search-javascriptを入れます。 ビルドします。 npm i -g nativefier curl https://azu.github.io/in-site-search-javascript/index.js > index.js nativefier --name "ECMAScript" "https://
Native ECMAScript modules: nomodule attribute for the migration Serg Hospodarets Blog In one of my previous articles Native ECMAScript modules: the new features and differences from Webpack modules we attempted to detect if the browser supported ES modules. We needed this to determine either, to execute a bundled (classic) file or a script which uses the native ECMAScript module features. We manag
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く