File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 55 "main" : " src/index.js" ,
66 "scripts" : {
77 "pretest" : " standard" ,
8+ "lint-fix" : " standard --fix" ,
89 "test" : " ./node_modules/mocha/bin/mocha spec/*.spec.js" ,
910 "coverage" : " nyc npm test" ,
1011 "release" : " standard-version"
Original file line number Diff line number Diff line change @@ -66,14 +66,14 @@ function applyWhen (fn, args) {
6666 }
6767}
6868
69- function bindAll ( obj ) {
70- const names = Object . getOwnPropertyNames ( obj . prototype ) ;
69+ function bindAll ( obj ) {
70+ const names = Object . getOwnPropertyNames ( obj . prototype )
7171 names . forEach ( name => {
72- const prop = obj . prototype [ name ] ;
72+ const prop = obj . prototype [ name ]
7373 if ( typeof prop === 'function' ) {
74- obj [ prop ] = obj . prop . bind ( obj ) ;
74+ obj [ prop ] = obj . prop . bind ( obj )
7575 }
76- } ) ;
76+ } )
7777}
7878
7979function clone ( source , target ) {
@@ -261,7 +261,7 @@ function mapCall (method, map) {
261261 } else {
262262 return function ( actor , message ) {
263263 let appliedArgs = [ actor ]
264- argumentList . each ( ( arg ) => {
264+ argumentList . forEach ( ( arg ) => {
265265 appliedArgs . push ( message [ arg ] )
266266 } )
267267 return method . apply ( undefined , appliedArgs )
@@ -405,6 +405,7 @@ function without (a, b) {
405405module . exports = {
406406 any : any ,
407407 applyWhen : applyWhen ,
408+ bindAll : bindAll ,
408409 contains : contains ,
409410 clone : clone ,
410411 defaults : defaults ,
You can’t perform that action at this time.
0 commit comments