IT

 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 

 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 

 

 

 






 







 


IT

 

 

AI  

 

 






 







 


 

 

 

 

 

 

 






 







 


 

 

 

 

 

 

 

 






 







 


 

Web  

 

 

PlayStation  

 

YouTuber  

 





 

 





 

 

 












Ecma International approves ECMAScript 2024: Whats new?  

3users  
2ality.com  


Ecma International approves ECMAScript 2024: Whats new? On 26 June 2024, the 127th Ecma General Assembly approved the ECMAScript 2024 language specification, which means that its officially a standard now. This blog post explains whats new. The editors of ECMAScript 2024  # The editors of this release are: Shu-yu Guo Michael Ficarra Kevin Gibbons Whats new in ECMAScript 2024?  # Grouping synch




 

2024/06/27 09:16
 



 

















ECMAScript 2023 feature: symbols as WeakMap keys  

3users  
2ality.com  


In this blog post, we take a look at the ECMAScript 2023 feature Symbols as WeakMap keys  which was proposed by Robin Ricard, Rick Button, Daniel Ehrenberg, Leo Balter, Caridy Patiño, Rick Waldron, and Ashley Claymore. What are WeakMaps good for?  # The key ability of a WeakMap is to associate data with a value: The value is the key of a WeakMap entry. The data is the value of that entry. Consi




 

2024/05/21 22:25
 



 











ECMAScript proposal: iterator helpers  

3users  
2ality.com  


Update 2022-12-15: New section How will this proposal affect future JavaScript APIs? In this blog post, we look at the ECMAScript proposal Iterator helpers by Gus Caplan, Michael Ficarra, Adam Vandolder, Jason Orendorff, Kevin Gibbons, and Yulia Startsev. It introduces utility methods for working with iterable data: .map(), .filter(), .take(), etc. The style of the proposed API clashes with th




 

2022/12/10 09:37
 









 











ECMAScript proposal: `Array.fromAsync()`  

3users  
2ality.com  


This blog post is about the ECMAScript proposal Array.fromAsync for JavaScript by J. S. Choi. It introduces a static method for converting asynchronous iterables to Arrays. Tools for working with synchronous iterables  # Currently JavaScript provides several tools for working with synchronous iterables  for example: function* createSyncIterable() { yield 'a'; yield 'b'; yield 'c'; } // Array-de




 

2022/11/28 09:00
 





 











ECMAScript proposal: RegExp flag `/v` makes character classes and character class escapes more powerful  

6users  
2ality.com  


ECMAScript proposal: RegExp flag /v makes character classes and character class escapes more powerful In this blog post, we look at the ECMAScript proposal RegExp v flag with set notation + properties of strings by Markus Scherer and Mathias Bynens. The new flag /v  # The proposed new regular expression flag /v (.unicodeSets) enables three features: Support for multi-code-point graphemes (such a




 

2022/11/19 10:11
 













 











JavaScript metaprogramming with the 2022-03 decorators API  

9users  
2ality.com  


More information on the syntax and semantics of decorators (optional section)  # (This section is optional. If you skip it, you can still understand the remaining content.) The syntax of decorator expressions  # A decorator expression starts with a chain of one or more identifiers, separated by dots. Each identifier except the first one can be private (prefix #). Square brackets [] are not allowed




 

2022/10/19 07:11
 







 











An overview of Node.js: architecture, APIs, event loop, concurrency  

3users  
2ality.com  


Warning: This blog post is outdated. Instead, read chapter An overview of Node.js: architecture, APIs, event loop, concurrency in Shell scripting with Node.js. This blog post gives an overview of how Node.js works: What its architecture looks like. How its APIs are structured. A few highlights of its global variables and built-in modules. How it runs JavaScript in a single thread via an event




 

2022/09/09 08:56
 





 











Executing shell commands from Node.js  

3users  
2ality.com  


Warning: This blog post is outdated. Instead, read chapter Running shell commands in child processes in Shell scripting with Node.js. In this blog post, well explore how we can execute shell commands from Node.js, via module 'node:child_process'. Overview of this blog post  # Module 'node:child_process' has a function for executing shell commands (in spawned child processes) that comes in two




 

2022/07/06 14:48
 





 











Ecma International approves ECMAScript 2022: Whats new?  

4users  
2ality.com  


Ecma International approves ECMAScript 2022: Whats new? On 22 June 2022, the 123nd Ecma General Assembly approved the ECMAScript 2022 language specification, which means that its officially a standard now. This blog post explains whats new. The editors of ECMAScript 2022  # The editors of this release are: Shu-yu Guo Michael Ficarra Kevin Gibbons Whats new in ECMAScript 2022?  # New members of




 

2022/06/23 10:47
 





 











Processing Arrays non-destructively: `for-of` vs. `.reduce()` vs. `.flatMap()`  

6users  
2ality.com  


Processing Arrays non-destructively: for-of vs. .reduce() vs. .flatMap() In this blog post, we look at three ways of processing Arrays: The for-of loop The Array method .reduce() The Array method .flatMap() The goal is to help you choose between these features whenever you need to process Arrays. In case you dont know .reduce() and .flatMap() yet, they will both be explained to you. In order to g




 

2022/05/27 09:09
 





 











RFC 9239: Updates to ECMAScript media types  

3users  
2ality.com  


(This blog post is based on a tweet thread and additional input by Mathias Bynens.) After work started on it in August 2017, May 2022 finally saw the publication of RFC 9239 Updates to ECMAScript media types by Matthew A. Miller, Myles Borins, Mathias Bynens, and Bradley Farias. It updates JavaScript MIME type registrations to align with reality: The JavaScript MIME type is now unambiguously tex




 

2022/05/19 09:09
 







 











The triple dot syntax (`...`) in JavaScript: rest vs. spread  

4users  
2ality.com  


The triple dot syntax (...) in JavaScript: rest vs. spread In JavaScript, the same syntax  triple dots (...)  is used for two different mechanisms: Rest syntax is for receiving data. Spreading is for sending data. This blog post examines how these mechanisms work and why they are not operators. Receiving data: rest syntax  # A rest parameter is a special kind of parameter that receives all remai




 

2022/05/05 09:29
 



 











ECMAScript proposal Change Array by copy: four new non-destructive Array methods  

3users  
2ality.com  


ECMAScript proposal Change Array by copy: four new non-destructive Array methods This blog post describes the ECMAScript proposal Change Array by copy by Robin Ricard and Ashley Claymore. It proposes four new methods for Arrays and Typed Arrays: .toReversed() .toSorted() .toSpliced() .with() The new methods are for Arrays and TypedArrays  # This blog post only demonstrates the new methods with




 

2022/04/12 08:24
 







 











First look: adding type annotations to JavaScript  

3users  
2ality.com  


Update 2022-03-10: Im quoting a few insightful tweets at the end of this blog post. The ECMAScript proposal Types as comments (by Gil Tayar, Daniel Rosenwasser, Romulo Cintra, Rob Palmer, and others) is about adding type annotations to JavaScript (there is also an accompanying blog post). Such type annotations would look similar to TypeScripts and Flows annotations and are completely ignored




 

2022/03/10 13:10
 





 











What are wrapper objects for primitive values?  

3users  
2ality.com  


This blog post is first in a series of two: What are wrapper objects for primitive values? How do primitive values get their properties? Each of the primitive types boolean, number, bigint, string and symbol has an associated wrapper class (Boolean, Number, BigInt, String, Symbol). In this blog post, we examine what these classes are good for. Wrapper classes for primitive types  # This is an exha




 

2022/02/21 13:36
 





 











A pipe operator for JavaScript: introduction and use cases  

10users  
2ality.com  


The proposal Pipe operator (|>) for JavaScript (by J. S. Choi, James DiGioia, Ron Buckton and Tab Atkins) introduces a new operator. This operator is an idea borrowed from functional programming that makes applying functions more convenient in many cases. This blog post describes how the pipe operator works and what its use cases are (there are more than you might expect!). The two competing pro




 

2022/01/27 21:02
 





 











New in Node.js: `node:` protocol imports  

6users  
2ality.com  


Node.js now supports a node: protocol for built-in modules. The new node: protocol  # Previously: import * as fs from 'fs/promises'; Now: import * as fs from 'node:fs/promises'; Benefits of node: imports  # What are the benefits of using node: module specifiers? Its immediately clear that a built-in Node.js module is imported. Given how many of them there now are, thats useful information. There




 

2021/12/13 14:37
 







 











ES2022 feature: class static initialization blocks  

3users  
2ality.com  


The ECMAScript proposal Class static initialization blocks by Ron Buckton is at stage 4 and scheduled to be included in ECMAScript 2022. For setting up an instance of a class, we have two constructs in JavaScript: Field: Create (and optionally initialize) instance properties. Constructor: A block of code that is executed before setup is finished. For setting up the static part of a class, we onl




 

2021/09/01 19:38
 





 











JavaScript needs more helper functions for iteration (map, filter, etc.)  where should we put them?  

13users  
2ality.com  


JavaScript needs more helper functions for iteration (map, filter, etc.)  where should we put them? Iteration is a standard that connects operations with data containers: Each operation that follows this standard, can be applied to each data container that implements this standard. In this blog post: We first explore three questions: How does JavaScripts iteration work? What are its quirks? What




 

2021/08/10 11:54
 







 











Simple monorepos via npm workspaces and TypeScript project references  

5users  
2ality.com  


Simple monorepos via npm workspaces and TypeScript project references A monorepo is a single repository that is used to manage multiple projects. In this blog post, well explore how to set up a simple monorepo for two npm packages. All we need is already built into npm and TypeScript. What is a monorepo and why is it useful?  # Whenever we have to develop multiple interdependent npm packages in p




 

2021/07/21 19:18
 





 











TypeScript and native ESM on Node.js  

33users  
2ality.com  


In this blog post, Ill explain everything you need to know in order to use and produce native ECMAScript modules on Node.js. The GitHub repository iterable is an example of a TypeScript ESM package that works on Node.js. It still uses the "typesVersions" workaround (which isnt needed in TypeScript 4.7 and later). (Thanks to Guy Beford and Oleg Drapeza for their feedback on this post.) TypeScript




 

2021/07/07 21:43
 













 











Temporal: getting started with JavaScripts new date time API  

10users  
2ality.com  


Temporal: getting started with JavaScripts new date time API Updates: 2022-01-10: Temporal.now was renamed to Temporal.Now. 2021-06-30: Rearranged the content and created a section on the concepts and patterns used by the Temporal API. 2021-06-29: Clarified how Instant uses the ISO-8601 calendar. Listed the properties of some classes. Date, JavaScripts current date time API is infamously difficu




 

2021/06/29 00:45
 











 











ECMAScript proposal: JSON modules  

4users  
2ality.com  


In this blog post, we examine the ECMAScript proposal JSON modules (by Sven Sauleau, Daniel Ehrenberg, Myles Borins, and Dan Clark). It lets us import JSON data as if it were an ECMAScript module. Why would we want to import JSON like a module?  # Various bundlers (such as webpack) have allowed us to import JSON data as if it were an ECMAScript module for a long time. JSON modules turn this into




 

2021/06/16 21:24
 







 











`undefined` vs. `null` revisited  

35users  
2ality.com  


Many programming languages have one non-value called null. It indicates that a variable does not currently point to an object  for example, when it hasnt been initialized yet. In contrast, JavaScript has two such non-values: undefined and null. In this blog post, we examine how they differ and how to best use or avoid them. undefined vs. null  # Both values are very similar and often used inte




 

2021/01/30 05:03
 











 











ECMAScript proposal: Import assertions  

4users  
2ality.com  


The ECMAScript proposal Import assertions (by Myles Borins, Sven Sauleau, Dan Clark, and Daniel Ehrenberg) introduces syntax for associating metadata with import statements. In this blog post, we examine what that looks like and why its useful. Import assertions  # The motivating use case for import assertions was importing JSON data as a module. That looks as follows (and is further specified




 

2021/01/24 21:35
 







 











Writing JavaScript tools in other languages  a new trend?  

13users  
2ality.com  


Writing JavaScript tools in other languages  a new trend? Recently, we have seen an uptick of JavaScript tools being written in languages other than JavaScript. This blog post lists a few examples and explains the appeal of not using JavaScript. Examples  # I asked on Twitter and these are a few of the examples that people mentioned: Build tools and compilers: esbuild  Go: JavaScript bundler and




 

2020/10/10 10:00
 







 











ECMAScript 2021  

7users  
2ality.com  


Update 2021-06-22: The 121st Ecma General Assembly approved the ECMAScript 2021 language specification, which means that its officially a standard now. This blog post describes whats new. The editors of ECMAScript 2021  # The editors of this release are: Jordan Harband Shu-yu Guo Michael Ficarra Kevin Gibbons A word on ECMAScript versions  # Note that since the TC39 process was instituted, the i




 

2020/09/25 12:13
 









 











Minimal React: getting started with the frontend library  

6users  
2ality.com  


This blog post explains how to get started with React while using as few libraries as possible. Required knowledge  # Things you should know before reading this blog post: JavaScript: You should have already written code in that language. Browser DOM (document object model): It helps if you are loosely familiar with how the DOM represents HTML and how it handles events. npm: It also helps if you h




 

2020/08/31 19:30
 







 











TypeScript: validating external data  

7users  
2ality.com  


Data validation means ensuring that data has the desired structure and content. With TypeScript, validation becomes relevant when we receive external data such as: Data parsed from JSON files Data received from web services In these cases, we expect the data to fit static types we have, but we cant be sure. Contrast that with data we create ourselves, where TypeScript continuously checks that eve




 

2020/06/11 08:21
 







 








 




























 

2ality  JavaScript and more  

 



j

k

l

e

o
 
 
















 









 

















 









 









 







Pro



 




 






App Storeからダウンロード
Google Playで手に入れよう


Copyright © 2005-2024 Hatena. All Rights Reserved.
 





x