フィードを検証するようにした。投稿時にはめったに壊れないはずなので、バージョンを上げた時にのみ検証している。バージョンが上がった時は、生成する仕組みやテンプレートが変わり、壊れたりするかもしれない。数ファイルだけなので、W3C Feed ValidatorのAPIを利用した。 APIはSOAPとなっているが、outputパラメーターをsoap12にし、普通にウェブ・フォームとして(x-www-form-urlencodedで)POSTするとXMLで返ってくるというもののようだ。node-soapパッケージなどを使う必要はない。 node-fetchパッケージを使う場合は、&でつなげた文字列をbodyオプションに指定するのではなく、URLSearchParamsオブジェクトを使う。Fetch標準では、bodyオプションの値がURLSearchParamsだった場合、Content-Typeヘ
Recently, one of my teammates noted that our project’s codebase doesn’t have a lot of classes. The observation wasn’t framed positively or negatively. It was just an observation about a particular code style of the team as a whole. I didn’t think much about it at the time. But looking back, this observation has lead to some good self-reflection on what I value when writing software. I didn’t write
I just ran into a problem with setTimeout and setInterval. Turns out the delay (in milliseconds) for these functions is a 32 bit signed quantity, which limits it to 231-1 ms (2147483647 ms) or 24.855 days. I was writing an application that needed a 30+ day delay and my setTimeout callbacks were firing instantly. Here's code that demonstrates it: setTimeout(function () { alert("doesn't work - insta
“Regular Expressions Cookbook manages to be simultaneously accessible and almost ridiculously comprehensive.” —Jeff Atwood Recommended regex tools: • RegexBuddy • RegexMagic • PowerGREP What is it? XRegExp provides augmented (and extensible) JavaScript regular expressions. You get modern syntax and flags beyond what browsers support natively. XRegExp is also a regex utility belt with tools to make
This blog post is outdated. Please read chapter “Generators” in “Exploring ES6”. This blog post is part of a series on iteration in ES6: Iterables and iterators in ECMAScript 6 ES6 generators in depth Generators, a new feature of ECMAScript 6 [1], are functions that can be paused and resumed. This helps with many applications: iterators, asynchronous programming, etc. This blog post explains how g
先に言っておくと疑問文で終わる雑な記事です。 Promise、正常系の処理は比較的簡単に書けるのだけど、何か間違いがあったときに Promise 自体のエラーハンドリングが強力すぎて良く分からなくなる。 readFile というファイルを読み込む Promise ベースの良くできた関数があるとして、 読み込んだファイルを処理するとき readFile("foo.txt").then(function(text) { doSomething(text); }); ファイルが読み込めない場合を想定するとき readFile("not-found.txt").then(function(text) { doSomething(text); }, function() { readFailed(); }); この時、catch を使うのは良くなくて、ファイルの読み込みは成功したのに readFai
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
This is now a mature project on GitHub! Please submit comments/issues there. Chances are that if you’ve done any significant Javascript work, you’ve run into a situation where part of the debugging process could be much improved if you just had the function call stack. I’m going to give you some ways of doing this with and without the popular Firebug extension and have some examples of their uses.
In this chapter, I: discuss nested callbacks and control flow in Node introduce three essential async control flow patterns: Series - for running async tasks one at a time Fully parallel - for running async tasks all at the same time Limitedly parallel - for running a limited number of async tasks at the same time walk you through a simple implementation of these control flow patterns and convert
This talk is about how to use browserify to develop front-end modular code using Common.JS, and how those modules should be documented, designed, and released using an automated build system. In order to explain these concepts I'll walk you through a few of my own open-source creations, highlighting interesting points as we go along.
最近プレゼンとかでウェブベースのアプリを実演する機会がわりとあったりします。そのときちょっと不便なのは、マウスをどのように操作して、どこでどういう風にクリックしたのかがいまいち伝わりにくいということで。まあしょうがないかと思ってたんですが。 そうしたら次期Androidのマテリアルデザインでは波紋エフェクトが使われるようになるとか。あー、その手があったか。そういえば、スマホじゃなくてPCの世界ではそういうのときどき見たことあるな、と思ってJavaScriptで作ってみました。 http://aikelab.net/visibletouch/ https://github.com/aike/VisibleTouch.js 発想の元はマテリアルデザインの波紋エフェクトですが、プレゼン用ということで最終的にいろいろ違った感じになりました。たぶん探せば同じようなツールはすでにたくさんあって101回
This is a book about JavaScript, programming, and the wonders of the digital. You can read it online here, or buy your own paperback copy (3rd edition). Written by Marijn Haverbeke. Licensed under a Creative Commons attribution-noncommercial license. All code in this book may also be considered licensed under an MIT license. Illustrations by various artists: Cover by Péchane Sumi-e. Chapter illust
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く