The blog post covers new features of strings in ECMAScript 6 (ES6). Unicode code point escapes # Unicode “characters” (code points) are 21 bit long [1]. JavaScript strings are (roughly) sequences of 16 bit characters, encoded as UTF-16. Therefore, code points beyond the first 16 bits of the code point range (the Basic Multilingual Pane, BMP) are represented by two JavaScript characters. Until now
node・iojsでもレスポンス改善が期待できます。 waterfallの速度比較taskのサイズによっても速度が大きく変わってくるため、task数の変化による速度変化を調べます。 ツールの仕様は以下の通りです。 task数がlowerからinterval間隔でupperまで実行毎回順番がランダム毎回gcを走らせるn回の平均速度[μs]を計測demo2.jsvar statistic = require('func-comparator').statistic; var _ = require('lodash'); var async = require('async'); var neo_async = require('neo-async'); // サンプリング回数 var times = 100; var create = function(count) { // countはta
In the world of enterprise JavaScript web development, the solutions being built, and the tools being used to build these solutions, are often written minimally to run in an ECMAScript 3 environment (aka ES3). You may wonder how this can be. After all, ECMAScript 5 was finalized in June 2011 and is supported by all modern browsers, including IE 9 (except for strict mode). In this article, I'll exa
Checks if the given value type is arguments. var getArguments = function() { return arguments; }; var arguments = getArguments(); is.arguments(arguments); => true is.not.arguments({foo: 'bar'}); => true is.all.arguments(arguments, 'bar'); => false is.any.arguments(['foo'], arguments); => true // 'all' and 'any' interfaces can also take array parameter is.all.arguments([arguments, 'foo', 'bar']); =
最近のASTパーサの動き 自己紹介 azu @azu_re Web scratch, JSer.info Esprima Owner: @ariya Spidermonkey Parser APIのASTを元に実装したJavaScriptパーサ JavaScriptパーサのデファクト的な立ち位置 Esprimaの問題 Spidermonkey AST自体にはES6等の対応がない(ES6はまだだったので) Harmony Branchで実装FirstでES6対応をやっていた 微妙にパーサ間でES6のASTに齟齬がでてきた 加えて@ariyaが忙しいので対応に遅れがでてきた (@ariyaは後述するShift ASTを推奨する方向) Esprima-FB Owner: Facebook JSX/FlowTypeサポート Esprima/Harmony Branchのfork Esprima/H
サンプルのデモページ サンプルで添付している html/lemmatizer_sample.html のデモページです。 JavaScript Lemmatizer デモページ 適当に英語の単語の変化形を入力、品詞を選択して(未選択でも可)、「Search Lemma」ボタンを押しますと、入力単語の原形を出力します。 使い方と取得できる単語の原形の戻り値 実際のメソッドの使い方や、取得できる戻り値は以下の通りです。js/lemmatizer.js をロード後、Lemmatizer インスタンスを生成して、Lemmatizer#lemmas か Lemmatizer#only_lemmas メソッドを使用します。 // initialize Lemmatizer. var lemmatizer = new Lemmatizer(); // retrieve a lemma with a pa
2014年4月にリリースされたClosure Templates 2.4では、いくつか面白い新機能が追加されています。 前記事ではパラメータの型チェック機能について紹介したので、今回はStrict Autoescapingについて紹介します。 Contextual Autoescapingの廃止 Closure Templatesには、Cotextual Autoescapingという強力なオートエスケープ機能があります。 Closure Templatesのオートエスケープが最強すぎる件 詳しくは上記の記事を参照してもらえるといいのですが、要は出力先がHTMLであるのか、JavaScriptなのか、CSSなのかというコンテキストを自動的に判別して、最適なエスケープをおこなってくれる機能です。 しかしこのContextual Autoescapingは、Closure Templates
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く