Closed azu closed 7 years ago
候補
// String.raw
function tag(strings, ...values) {
return strings.reduce((a, s, i) => a + values[i - 1] + s);
}
tagged template literal書き方
reduceでやるほうが良いのかな? https://github.com/asciidwango/js-primer/blob/master/source/use-case/ajaxapp/display/README.md
function escapeHTML(strings, ...values) {
return strings.reduce((accumulator, string, index) => {
return accumulator + escapeSpecialChars(values[index - 1]) + string;
});
}
console.logと// => の使い分け #195
console.log(a); // => x
a; // => x
ラベル管理について
色々カテゴリ別に追加した。 (多分使わないのがあると思うのでいらないのは消して良さそう)
議論で方針が決まったIssueはStatus: Ready for PR
をつけるか閉じるかしていきたい。
ここからログ
encodeURIComponent()
+ template literalでURLのパス?
const tagName = "空白が 混ざった 文字列";
path`/tags/${tagName}`
APIのパス組み立ての例をtagged templateで簡単に紹介。
`https://${apiHost}/${path}`
console.logと// => の使い分け #195
について。 ウェブだとあった方が便利。だけど書籍だと醜そう。
場合によって分けるとかで良い気がする。
console.log(a); // => aの結果
がconsole.logの結果が右側っぽく見える
Node.だとconsole.log({});// [Object object]
なので意味が異なる可能性がある。
node -v v7.2.0
> console.log({s:1})
{ s: 1 }
undefined
> console.log({s:1})
> var object = { a : {} }
undefined
> console.log(object)
{ a: {} }
undefined
> var object = { a : { b : 1} }
undefined
> console.log(object)
{ a: { b: 1 } }
undefined
> var object = { a : { b : 33 } }
コメントのところに評価コメントの書式についてをちゃんと説明を書く。 不要なところについてはconsole.logは省いても良い。
ラベルの管理方法についてを説明
https://github.com/asciidwango/js-primer/labels/Status%3A%20Ready%20for%20PR は議論済みでコミットできる状態のissue
console.error(error.message, error.stack)
エラーの出し方
console.error(error)
に揃える。
string: 「文字列」「部分文字列」「検索文字列」 #208
先人の知恵を頼ろう。
正規表現は文字列の章に混ぜた。
目次のカバレッジの話
大体半分ぐらい?
手が空いたらビルトインオブジェクトに手を付ける?
nodecliの次はJSON辺りから手を付ける
目次整理
とか書いとかないと忘れる
次回: 5月26日(金曜日)
Screen Object こんなのあるんだ
アジェンダ置き場