When you're writing tests, you often need to check that values meet certain conditions. expect gives you access to a number of "matchers" that let you validate different things.

この記事はJavaScriptの入門書として書いているjs-primerのthisに関する部分をベースにしています。 またjs-primerでは書けなかった現在時点(2018年1月1日)でのブラウザの挙動についてを加えたものです。 次の場所にjs-primer版(書籍版)のthisについての解説があります。 この記事と違って実際にコードを実行しながら読めるので、学習ソースとしては書籍版を推奨します。 書籍版: 関数とthis · JavaScriptの入門書 #jsprimer また、バグ報告やPRも直接リポジトリにして問題ありません。 asciidwango/js-primer: JavaScriptの入門書 おかしい場所を選択した状態で右下にある”Bug Report”ボタンを押せば、簡単にtypoとかのバグを報告できます。(PRでも歓迎) 前置きはこの辺までで、ここから本編。 この記
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 12/1 に Qiita のトップページをリニューアルしました。これまで React を使っていましたが、それをやめて hyperapp を採用しました。まわりを見てもあまり採用事例が見当たらないので、この記事では一体なんで今をときめく React ではなく hyperapp を選択したのか、どういうところが魅力的なのかについて プレゼンテーション層を実装するためのツールとして 学習コスト の観点から書きたいと思います。なおこの記事に書かれていることは全て個人の感想であり、はっきりいって個人の日記レベルです。 それと hyperapp
PySpa統合思念体です。これからJavaScriptを覚えるなら、「この書き方はもう覚えなくていい」(よりよい代替がある)というものを集めてみました。 ES6以降の難しさは、旧来の書き方にプラスが増えただけではなく、大量の「旧来の書き方は間違いを誘発しやすいから非推奨」というものを作り出した点にあります。5年前、10年前の本やウェブがあまり役に立たちません。なお、書き方が複数あるものは、好き嫌いは当然あると思いますが、あえて過激に1つに絞っているところもあります。なお、これはこれから新規に学ぶ人が、過去のドキュメントやコードを見た時に古い情報を選別するためのまとめです。残念ながら、今時の書き方のみで構成された書籍などが存在しないからです。 たぶん明示的に書いていても読み飛ばす人はいると思いますが、すでに書いている人向けではありません。これから書くコードをこのスタイルにしていくのは別にいい
gRPC-Web: Moving past REST+JSON towards type-safe Web APIs - Improbableを見て、grpcwebを使えばgoogle.golang.org/grpc製の既存gRPCサーバがブラウザからも叩けるようになるとのことなので試してみた。 github.com サーバ側の変更点 DOC.mdにも書いてあるように grpc.Serverをgrpcweb.WrappedGrpcServerに変換して http.ServerからServeするようにする の2点を行うだけ。 diff --git a/backend/main.go b/backend/main.go index 0f230c4..f261ab9 100644 --- a/backend/main.go +++ b/backend/main.go @@ -2,8 +2,9 @
API-first authentication, authorization, and fraud prevention Website | Documentation | Node.js We’re bound by one common purpose: to give you the financial tools, resources and information you ne... www.principal.com Buy real Instagram followers from Twicsy starting at only $2.97. Twicsy has been voted the best site... twicsy.com
If you’re working on a full-stack JavaScript application in WebStorm, you’ve probably noticed that code completion suggests some Node.js APIs in your client-side code and DOM APIs in the Node.js code. Here’s how to fix that. What is Library in WebStorm? All the objects defined in your application are automatically added to the WebStorm completion suggestions, but for adding Node.js and DOM APIs as
導入 リアルタイム入力チェックのためのイベントとして、DOM Level 3 Eventsではinputイベントが定義されています。 比較的最近のブラウザはサポートしているものの、未だに非対応のブラウザが存在します。 今回、Dottoro Web Referenceの記事 Matt's 411の記事に3DS用の処理を加筆する形でinputイベントのクロスブラウザ用コードを書いてみました。これについて意見をお願いします。 特に、以下に挙げる環境での検証結果を教えていただけるとありがたいです。 iOS Android Windows Phone Macintoshの各ブラウザ Newニンテンドー3DS PlayStation Vita 追記 IE9では、inputイベントで文字を削除した時にイベントが発生しないバグが存在するようです。 よく読んだらDottoro Web Referenceの記
This module saves you (and others!) time in three ways: No configuration. The easiest way to enforce code quality in your project. No decisions to make. No .eslintrc files to manage. It just works. Automatically format code. Just run standard --fix and say goodbye to messy or inconsistent code. Catch style issues & programmer errors early. Save precious code review time by eliminating back-and-for
ブラウザのES6サポートが急速に良くなってきています。社内ツールとかElectronとか、ブラウザの普及率を気にしなくていい環境ならそろそろ使えるのではないかと思って調べたり試してみたりしています。 更新 https://caniuse.com/#search=es6 http://kangax.github.io/compat-table/es2016plus/ これを見るともうほぼ実装は完了していますね。Node.jsも対応していますし使えるブラウザが限定できるならもはや変換なんかしなくても大丈夫。注意点としては以下の2つ。 IE11は渋い ES6 modulesはまだまだ ソースをES6で書いて、結果もそのままES6という手抜き開発に使えるツールのメモです。手抜きなので、おそらく経年変化の影響はほとんどないはずです。対象としてはブラウザだったり、ElectronでのSPA開発です。
Fluxxor is a set of tools to facilitate building JavaScript data layers using the Flux architecture by reifying many of the core Flux concepts. It works particularly well in conjunction with React as the view layer, and contains a few helpers to make integration with React applications easier. The Flux architecture... ...makes it easier to reason about changes to your application's data ...eschews
In my React component I have a button meant to send some data over AJAX when clicked. I need to happen only the first time, i.e. to disable the button after its first use. How I'm trying to do this: var UploadArea = React.createClass({ getInitialState() { return { showUploadButton: true }; }, disableUploadButton(callback) { this.setState({ showUploadButton: false }, callback); }, // This was simpl
この JavaScript ガイドでは、JavaScript の使い方を紹介し、この言語の概要を説明します。言語機能についてもっと知りたい場合は、JavaScript リファレンスを参照してください。 このガイドは、いくつかの章に分かれています。
JavaScriptTutorials and guidesBeginner's tutorialsYour first website: Adding interactivityDynamic scripting with JavaScriptJavaScript frameworks and librariesJavaScript GuideIntroductionGrammar and typesControl flow and error handlingLoops and iterationFunctionsExpressions and operatorsNumbers and stringsRepresenting dates & timesRegular expressionsIndexed collectionsKeyed collectionsWorking with
JavaScriptチュートリアルBeginner's tutorialsYour first website: Adding interactivityDynamic scripting with JavaScriptJavaScript frameworks and librariesJavaScript ガイド入門編文法とデータ型制御フローとエラー処理ループとイテレーター関数式と演算子数値と文字列日付と時刻の表現正規表現インデックス付きコレクションキー付きコレクションオブジェクトの利用クラスの使用プロミスの使用JavaScript 型付き配列イテレーターとジェネレーターリソース管理国際化JavaScript モジュール中級編Advanced JavaScript objectsAsynchronous JavaScriptClient-side web APIs言語概要JavaScr
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く