This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- | ー | |
---|---|---|
~ | ~ | |
: | ー | |
; | っ | |
a | あ | |
ba | ば | |
bd | べん | |
be | べ | |
bh | ぶう | |
bi | び |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
module TelSplitter | |
MAP = { | |
# 市外局番 , 市内局番の桁数のマップ | |
# http://www.soumu.go.jp/main_sosiki/joho_tsusin/top/tel_number/number_shitei.html のデータを利用 | |
# 固定電話以外の桁数は適当です... | |
'050' => 4, # IP電話 | |
'070' => 4, # 携帯電話/PHS | |
'080' => 4, # 携帯電話 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
mkdir $1 | |
cd $1 | |
npm init -y | |
npm install -D babelify watchify babel-preset-es2015 babel-preset-react babel-plugin-syntax-flow babel-plugin-transform-flow-strip-types react react-dom | |
echo '{"presets": ["es2015", "react"], "plugins": ["transform-flow-strip-types", "syntax-flow"]}' > .babelrc | |
gibo Node OSX > .gitignore | |
cat <<EOF > .flowconfig | |
[ignore] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Database = Map[String, Any] | |
case class Item[+A](name: String) { | |
def get(d: Database) = d(name).asInstanceOf[A] | |
} | |
implicit class DB(val d: Database) extends AnyVal { | |
def get[A](n: Item[A]): A = n.get(d) | |
} |