You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
今年のOSS活動振り返り @ 2015 | Web Scratchで JavaScript/ECMAScriptを改めてどう学べばいいのか考える azu/how-to-learn-es6とか#thinking_in_es6で考えてるやつ というのを今年考える事としてあげていました。 それを考えるために、既存のコードがどうなってるかを見てみるという話です。 具体的には既存のコードを見て、そこでどういう機能/構文が多く使われているのかが分かれば、どこを中心的に学ぶと結果が出やすくなるのではという感じです。 それを分析するためにazu/es-usage-rateというツールを書いた。 Installation 使い方 例えば、es-usage-rate自体がどういう構文を使って書かれてるかを見てみてます。 es-usage-rateは他のCLIと組み合わせて使う事を前提としてるので、 デフォルト
In this blog post, I present enumify, a library for implementing enums in JavaScript. The approach it takes is inspired by Java’s enums. Enum patterns # The following is a naive enum pattern for JavaScript: const Color = { RED: 0, GREEN: 1, BLUE: 2, } This implementation has several problems: Logging: If you log an enum value such as Color.RED, you don’t see its name. Type safety: Enum values are
Every JavaScript developer wants to be up-to-date with the latest technologies, but when you are too busy it’s just not easy. How do you start and where do you find a detailed explanation? This is an introduction for a type of series, in which I want to provide a detailed explanation of the next generation JavaScript syntax. This will be a detailed guide for the most important functionality. A gui
Execute ECMAScript code uniformly across any ECMAScript host environment. See also eshost-cli for an easy way to use this library from the command line. Using eshost, you can create an agent (eg. a web browser or a command-line ECMAScript host) and evaluate scripts within that agent. Code running within the agent has access to the eshost runtime API which enables code to evaluate scripts, create n
This blog post explains four approaches for managing private data for ES6 classes: Keeping private data in the environment of a class constructor Marking private properties via a naming convention (e.g. a prefixed underscore) Keeping private data in WeakMaps Using symbols as keys for private properties Approaches #1 and #2 were already common in ES5, for constructors. Approaches #3 and #4 are new
1. About this book 2. Deploying ECMAScript 6 2.1 Using ECMAScript 6 today 2.2 ES6 REPLs 2.3 Transpilation tools 2.4 Other useful ES6 tools and libraries 2.5 The future: native ES6 2.6 Are there ES6 features that can’t be transpiled to ES5? 3. Babel setups for browsers and Node.js 3.1 npm and local installs 3.2 Source maps 3.3 Browser setup: ES6 via webpack and Babel 3.4 Node.js setup: Dynamically
Mixins and Javascript: The Good, the Bad, and the Ugly.Mixins and JavaScript are a like the classic Clint Eastwood movie. The good is that composing objects out of small pieces of implementation is even possible due to JavaScript's flexible nature, and that mixins are fairly popular in certain circles. The bad is a long list: there's no common idea of what the concept of a mixin even is in JavaScr
An Intro To Using npm and ES6 Modules for Front End Development The JavaScript landscape is changing quickly and along with it the way that we work with dependencies in our websites and applications. This post is for developers who are currently loading in their JavaScript via multiple script tags and finding that dependency management is becoming a little cumbersome as their webpages or applicati
This blog post explores references, a mechanism used by the ECMAScript language specification to explain the difference between the following two expressions: obj.prop() (0, obj.prop)() Method calls versus function calls # Consider the following object: var obj = { getThis: function () { "use strict"; return this; }, }; If you call obj.getThis, you have a method call (this points to the object in
Node.js Advent Calendar 2015の7日目の記事です。遅刻してごめんなさいごめんなさい。 sinopiaをs3対応して記事を書こうと思ったのですが、思ったより手こずってしまい、ESLintの2系のalpha版が出たので、そちらについて調べました。 ESLint v2.0.0-alpha-1 released 新しいルール 下記のルールが新しく追加される。 array-callback-return Arrayのfilterやreduceなど、callback内で値を返す必要があるのに返してない場合にエラーを出す。 no-implicit-globals 暗黙的にグローバルに定義されている変数がある場合にエラーを出す no-restricted-imports 任意のパッケージのimportを禁止する prefer-rest-params ES6のRest Parame
概要 Proxyを使うとオブジェクトに対する様々な操作に割り込み、好きな振る舞いをさせることが出来る。 記事更新履歴 [2016/03/23] ES2016でenumerateトラップが削除されるのに対応 [2015/12/02] 公開 APIの概要 提供されるメソッド new Proxy( target<Object>, handler<Object> ) -> <Proxy> // targetオブジェクトを基盤としたプロキシを作る // プロキシへの操作を受ける関数を入れたhandlerオブジェクトを指定する Proxy.revocable ( target<Object>, handler<Object> ) -> { proxy<Proxy>, revoke<Function> } // 無効化可能なプロキシをproxyプロパティに持ち、 // 無効化するためのrevokeメソッ
How to export a JavaScript moduleFew days ago I wrote a tweet that surprised many developers not fully aware on how CommonJS modules work. The same tweet also gave birth to some usual discussion about anti-patterns, confusion, what why and how … after all these years developers still write module.exports.stuff = 123; instead of this.stuff = 123; since module.exports === this — Andrea Giammarchi (@
あなたにとって重要なトピックや同僚の最新情報を入手しましょう最新の洞察とトレンドに関する最新情報を即座に受け取りましょう。 継続的な学習のために、無料のリソースに手軽にアクセスしましょうミニブック、トランスクリプト付き動画、およびトレーニング教材。 記事を保存して、いつでも読むことができます記事をブックマークして、準備ができたらいつでも読めます。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く