Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4aab34dd
authored
2013-12-12 17:48:01 -0500
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
switch to forEach to reduce for main return
1 parent
7865c573
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
src/m3u8/m3u8.pegjs
src/m3u8/m3u8.pegjs
View file @
4aab34d
/***** Start *****/
start
= tags:lines+ .* {
var obj = {},
choices = {
var choices = {
segments: 1,
comments: 1,
playlists: 1
};
tags.forEach(function(
tag) {
return tags.reduce(function(obj,
tag) {
for (var p in tag) {
if (p in choices) {
if (Object.prototype.toString.call(obj[p]) === '[object Array]') {
...
...
@@ -18,10 +17,11 @@ start
} else {
obj[p] = tag[p];
}
}
});
return obj;
}
}, {});
}
lines
= comment:comment _ { var obj = {}; obj["comments"] = comment; return obj; }
...
...
Please
register
or
sign in
to post a comment