Last active
August 29, 2015 14:12
-
-
Save TomoyaShibata/0ff4604297f53c78b63b to your computer and use it in GitHub Desktop.
RN2 Feedからオンエア時刻と曲目部だけを抽出するJS。chainメソッドを使ってメソッドチェーン化。GoogleFeedAPIに依存。
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
var musicLists = _.chain(result.feed.entries) | |
.map(entry => { return entry.content.split('<br>') }) | |
.flatten() | |
.compact() | |
.filter(splited => { return /[<\/]/.test(splited) }) // 全角山括弧または半角スラッシュを含む文字列 | |
.value(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment