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
11 years ago
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
src/m3u8/m3u8.pegjs
src/m3u8/m3u8.pegjs
View file @
4aab34d
/***** Start *****/
start
= tags:lines+ .* {
var obj = {},
choices = {
segments: 1,
comments: 1,
playlists: 1
};
tags.forEach(function(tag) {
var choices = {
segments: 1,
comments: 1,
playlists: 1
};
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,9 +17,10 @@ start
} else {
obj[p] = tag[p];
}
return obj;
}
});
return obj;
}, {});
}
lines
...
...
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment