Promise本の取り組み JavaScript Promiseの本の開発で取り組んだ事と取り組んでおくべき(考慮しておくべき)だったことについてのメモ書き 技術書のディレクトリ構成とか参考になるものがあんまりなくて適当に作ったので、その辺を整理をしたい目的で書いてます。 はじめに ここで書いたPromise本のディレクトリ構成やCI、テスト手法、使ったツールなどについては以下に大体書いてあります。 JavaScript Promiseの本 付録 上記の付録のソース : promises-book/Appendix-Note at master · azu/promises-book promises-book/CONTRIBUTING.md at master · azu/promises-book なので、結構省いて書いてるのでちゃんと見たい人は付録とかの方を見て下さい。 後、書籍の文
こんにちは丸山@h13i32maruです。 ES6のGeneratorを勉強する題材としてasync/awaitを実装してみたので、そのメモです。 Genratorとは ES6のGeneratorとは「任意の時点で処理を中断/再開することができる関数」というもの。一般的にはコルーチン(coroutine)と呼ばれるもので、サブルーチン(通常の関数)を一般化したもの。ES6でGeneratorを理解するには3つのキーワードがある。 Generator Function 処理の中断/再開が行われる特殊な関数 function* generatorFunction(){}のようにfunction*を使って定義する Generator Object 中断された処理を再開したり、値を取得し対するオブジェクト var generatorObject = generatorFunction()のように取
Introduction to JavaScript Promises Modern JS 勉強会 at GREE
JavaScript Advent Calendar 2014 11日目。 いきなり要約: Promiseや非同期テストのアサーションを簡単確実に書けるようになるesplanというライブラリのPoCを作った話。 Promiseや非同期のテストは難しい 詳しくはJavaScript Promiseの本: Chapter.3 Promiseのテストをご覧いただきたいのだが、Promiseのテストを正確に書くのはそんなに簡単ではない。 例えばmochaだと、 // 間違ったテスト1: // mayBeResolveWithOne() が1以外でresolveしたときタイムアウトエラーになる it("mayBeResolveWithOne()は1でresolveする", function(done) { mayBeResolveWithOne().then(function(value) { as
I've been getting big into promises over the last year. I think the two best resources that I've learnt from today is Forbes Lindesay's talk at JSConf.EU 2013 and Jake Archibald's excellent promise article on html5rocks. There's been some patterns that I use over and over so I wanted to share and document them. Please note that the examples used are mostly based on my real code, but have been simp
Promiseの(Promiseと言ってもES6 Promisesじゃなくてbluebirdなんだけど)catch内でのreturnとthrowの挙動の違いについて知らなくて試したのでメモ。 環境はnode.js 0.10.33とbluebird 2.3.11です。 var Promise = require('bluebird'); function a() { return new Promise(function(resolve, reject) { reject(1); }).catch(function(err) { return err; }); } a().then(function(data) { console.log('then'); console.log(data); });
Change the title or subtitle to customize how your story is presented across Medium. Don’t write aloneCopy and send this draft link to anyone. They’ll be able to leave you notes before you publish. este-dispatcherIsomorphic Flux like dispatcher with promises.Flux dispatcher changed our perspective how actions should flow in web app. If you take a look at todomvc.com, almost all frameworks are base
If you believe you found a bug with how fetch behaves in your browser, please don't open an issue in this repository unless you are testing in an old version of a browser that doesn't support window.fetch natively. Make sure you read this entire readme, especially the Caveats section, as there's probably a known work-around for an issue you've found. This project is a polyfill, and since all moder
This blog post is outdated. Please read chapter “Asynchronous programming (background)” in “Exploring ES6”. This blog post explains foundations of asynchronous programming in JavaScript. It is first in a series of two posts and prepares you for part two, which covers promises and the ECMAScript 6 promise API. The JavaScript call stack # When a function f calls a function g, g needs to know where
The document discusses the complexities of asynchronous programming in JavaScript, highlighting issues like 'callback hell' and the importance of promises for managing asynchronous operations. It outlines the characteristics and benefits of promises, including their immutability once resolved and flow control capabilities. The text also touches on advancements in JavaScript such as ES6 generators
Promiseは非同期処理をベースにした並列処理の実装方法の一種です。Promiseでは並列処理の各タスクが必ず1回実行されることが保証され、タスクとタスクからの結果を取得する処理を分離することできます。また、タスクの並列処理/直列処理をユーザーが自由に制御することができます。 ECMAScript Language Specification 6th EditionにPromiseが追加されたことから、しばらくの間JavaScriptの非同期処理に関する話題の中心はPromiseになると思われます。 Node.jsでも既にPromise対応したモジュールも多く、Promiseでのみ非同期処理を提供しているモジュールも存在します。Promiseを使用する機会は今後必然的に増えていくでしょう。 今回のエントリーでは、Node.jsでPromiseを使用する方法を説明します。コード例を中心に理
Promiseの仕様? JavaScriptにおけるPromiseの仕様といえば、次期ECMAScriptのECMAScript Language Specification ECMA-262 6th Edition – DRAFTで策定されています。 このES6 Promisesについて詳しくはJavaScript Promiseの本という無料の電子書籍で書いたのでこちらを参照して下さい。 以前、Promiseについて紹介した時に以下のように書いてました。 また、今後ブラウザに実装されるAPIとしてService WorkersやStreams API等、Promiseをベースしたものも出てきています。 – JavaScript Promiseの本を書きました | Web Scratch 実際にどれくらいの仕様がPromiseを参照してるかを調べてみました。 Promiseを参照する仕様
404 Not found! The page that you are looking for could not be found.
The library is a convenient alternative to sharing a root domain cookie. Unlike cookies, your client-side data isn't limited to a few kilobytes - you get up to 2.49M chars. For a client-heavy application, you can potentially shave a few KB off your request headers by avoiding cookies. This is all thanks to LocalStorage, which is available in IE 8+, FF 3.5+, Chrome 4+, as well as a majority of mobi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く