Underscore.js http://underscorejs.org/#object (and lodash.zipObject too)
var arr = ['foo', 'bar', 'baz'];
_.object(arr);
// => {foo: true, bar: true, baz: true}
_.object(arr, 1);
// => {foo: 1, bar: 1, baz: 1}
Underscore.js http://underscorejs.org/#object (and lodash.zipObject too)
var arr = ['foo', 'bar', 'baz'];
_.object(arr);
// => {foo: true, bar: true, baz: true}
_.object(arr, 1);
// => {foo: 1, bar: 1, baz: 1}
#!/bin/sh | |
# Update MacOSX 10.9.3 and Xcode 5.1.1 | |
# http://stackoverflow.com/questions/22313407/clang-error-unknown-argument-mno-fused-madd-python-package-installation-fa | |
brew install cmigemo | |
curl -O http://www.atzm.org/etc/files/pymigemo/pymigemo-0.4.tar.gz | |
# sudo easy_install pip | |
sudo LDFLAGS="-L/usr/local/Cellar/cmigemo/20110227/lib" CFLAGS="-I/usr/local/Cellar/cmigemo/20110227/include" pip install pymigemo-0.4.tar.gz |
import sys, commands | |
from percol.command import SelectorCommand | |
from percol.key import SPECIAL_KEYS | |
from percol.finder import FinderMultiQueryMigemo, FinderMultiQueryRegex | |
## prompt | |
# Case Insensitive / Match Method に応じてプロンプトに表示 | |
def dynamic_prompt(): | |
prompt = ur"" | |
if percol.model.finder.__class__ == FinderMultiQueryMigemo: |
このコミットで、実質的な定数をうまく推論できるようになった。(現在のmasterではデフォルト有効になっている)
以下のいずれかの条件を満たしたとき、その変数を定数とみなす。
.header-logo-wordmark { | |
color: red; | |
} | |
.form-actions button { | |
color: red; | |
} | |
#gists:before { | |
content: "This is github.com!"; |
Index: javascriptguide.xml | |
=================================================================== | |
--- javascriptguide.xml (リビジョン 65) | |
+++ javascriptguide.xml (リビジョン 138) | |
@@ -3,14 +3,14 @@ | |
<GUIDE title="Google JavaScript Style Guide"> | |
<p class="revision"> | |
- Revision 2.11 | |
+ Revision 2.93 |
JSer.info 200回記念イベントのLT資料
今朝起きたら、万が一のためにLTを準備しておかなければいけないとTwitterに書いてあったので、実装してみました。
ASTを使ったツールは世に溢れいているけど (eslint, jscs, power-assert, istanbul, uglify2...)、
それらのツールを複数組み合わせる場合、
based on v20141023 result
input
module.exports = function() {
var f = x
=> 2;
return f();
};
[ | |
{ | |
"browser_version": "11.1", | |
"device": null, | |
"browser": "opera", | |
"os_version": "Mavericks", | |
"os": "OS X" | |
}, | |
{ | |
"browser_version": "11.6", |