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
たまたまTwitterを見てたら以下のようなツイートを見かけました。 つまり、 isNumber っていう関数を作るなら一旦Numberでキャストした値と同一かどうかを比較すれば良いと。おそらく NaN を省いた number 型を true にしたいのかなという感じがする (NaN === NaN は必ず false)。 ただこれには問題があるらしく、 V8 のOptimizerリーダーである bmeurer から下記のようなレスが付いてました。 「 Number() では意図しない副作用があるかもしれない」という意味のレス。最初意味がわからなくて、「おや?」と思ったんですけど、その後で補足が。 「ToPrimitive関数が呼ばれてしまい、意図しないJSの動きをするかも。」とのこと。 つまり、
If comments are invalid because of typing mistakes, then documentation will be incomplete. If comments are inconsistent because they are not updated when function definitions are modified, then readers might become confused. Rule Details This rule enforces valid and consistent JSDoc comments. It reports any of the following problems: missing parameter tag: @arg, @argument, or @param inconsistent o
Microsoft社の新言語TypeScriptについて社内の自主研究発表会で発表した内容です。 対象バージョンは V0.9(2013年10月時点の最新)。 比較対象としてCoffeeScript, Haxe, Dartなどにも触れています。
最近、Grunt と grunt-contrib-watch を使っているのだけど、grunt-contrib-watch が CPU を消費しがちである。 watch 対象のファイルが少ないうちは grunt-contrib-watch は問題なく動くんだけども、ファイル数が増えてくると CPU の消費量が増えてくる。自分の環境では、1,000 個ぐらいのファイルを監視していると、常時 10% 程度 CPU を消費している。 この問題は既知であり、FAQ には次のように書いている。 たくさんのファイルを監視している場合、デフォルトの interval の値が小さすぎるかもしれない。options: { interval: 5007 } のようにして増やしてみてほしい。詳しくは issues #35 と #145 を参照のこと (※日本語訳は私によるもの) Another reason i
2013年03月25日11:45 カテゴリLightweight Languages書評/画評/品評 javascript - introducing wrap.js メンテナブルJavaScript Nicholas C. Zakas / 豊福剛訳 [原著:Maintainable JavaScript] で、き、た。 dankogai/js-wrap ・ GitHub What? なるべく多くの種類のオブジェクトを、なるべく直感的に、限りなく透明に近く wrap するためのシステムです。 こんな感じ。 var _ = Object.Wrap; /* for convenience */ try { log( _(42) .learn('square', function() { return this*this }) .square() * 1 /* 1764 */ ); log( (
Why am I seeing this?You are seeing this because the administrator of this website has set up Anubis to protect the server against the scourge of AI companies aggressively scraping websites. This can and does cause downtime for the websites, which makes their resources inaccessible for everyone. Anubis is a compromise. Anubis uses a Proof-of-Work scheme in the vein of Hashcash, a proposed proof-of
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く