File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module .exports = (grunt ) ->
2- require (' load-grunt-tasks' ) grunt
2+ require (' load-grunt-tasks' ) grunt , {
3+ pattern : [' grunt-*' , ' !grunt-template-jasmine-istanbul' ]
4+ }
35 grunt .file .readJSON (' package.json' )
46
57 # !! Compile configurations
Original file line number Diff line number Diff line change 33[ ![ Bower version] ( https://badge.fury.io/bo/comment-core-library.svg )] ( http://badge.fury.io/bo/comment-core-library )
44[ ![ Built with Grunt] ( https://cdn.gruntjs.com/builtwith.png )] ( http://gruntjs.com/ )
55[ ![ License] ( http://img.shields.io/badge/license-MIT-brightgreen.svg )] ( http://opensource.org/licenses/MIT )
6- [ ![ Build Status: Linux] ( https://travis-ci.org/aptx4869/CommentCoreLibrary.svg?branch=auto-test )] ( https://travis-ci.org/aptx4869/CommentCoreLibrary )
7- <!-- [](https://travis-ci.org/jabbany/CommentCoreLibrary)-->
8- [ ![ Coverage Status] ( https://coveralls.io/repos/aptx4869/CommentCoreLibrary/badge.png?branch=auto-test )] ( https://coveralls.io/r/aptx4869/CommentCoreLibrary?branch=auto-test )
9- <!-- [](https://coveralls.io/r/jabbany/CommentCoreLibrary?branch=master)-->
6+ [ ![ Build Status: Linux] ( https://travis-ci.org/jabbany/CommentCoreLibrary.svg?branch=master )] ( https://travis-ci.org/jabbany/CommentCoreLibrary )
7+ [ ![ Coverage Status] ( https://img.shields.io/coveralls/jabbany/CommentCoreLibrary.svg )] ( https://coveralls.io/r/jabbany/CommentCoreLibrary?branch=master )
108
119The CommentCoreLibrary is a set of Javascript modules that make up the
1210core controller for comments streaming on top of timed media (video or audio).
Original file line number Diff line number Diff line change 66var BinArray = ( function ( ) {
77 var BinArray = { } ;
88 BinArray . bsearch = function ( arr , what , how ) {
9- if ( arr . length == 0 ) return 0 ;
10- if ( how ( what , arr [ 0 ] ) < 0 ) return 0 ;
11- if ( how ( what , arr [ arr . length - 1 ] ) >= 0 ) return arr . length ;
9+ if ( arr . length === 0 ) {
10+ return 0 ;
11+ }
12+ if ( how ( what , arr [ 0 ] ) < 0 ) {
13+ return 0 ;
14+ }
15+ if ( how ( what , arr [ arr . length - 1 ] ) >= 0 ) {
16+ return arr . length ;
17+ }
1218 var low = 0 ;
1319 var i = 0 ;
1420 var count = 0 ;
@@ -18,15 +24,17 @@ var BinArray = (function(){
1824 count ++ ;
1925 if ( how ( what , arr [ i - 1 ] ) >= 0 && how ( what , arr [ i ] ) < 0 ) {
2026 return i ;
21- } else if ( how ( what , arr [ i - 1 ] ) < 0 ) {
27+ }
28+ if ( how ( what , arr [ i - 1 ] ) < 0 ) {
2229 high = i - 1 ;
2330 } else if ( how ( what , arr [ i ] ) >= 0 ) {
2431 low = i ;
25- } else
32+ } else {
2633 console . error ( 'Program Error' ) ;
27- if ( count > 1500 ) console . error ( 'Too many run cycles.' ) ;
34+ }
35+ if ( count > 1500 ) { console . error ( 'Too many run cycles.' ) ; }
2836 }
29- return - 1 ;
37+ return - 1 ; //this line can never been run
3038 } ;
3139 BinArray . binsert = function ( arr , what , how ) {
3240 var index = BinArray . bsearch ( arr , what , how ) ;
You can’t perform that action at this time.
0 commit comments