@@ -20,8 +20,8 @@ You might also be interested in [always-done](https://github.com/hybridables/alw
2020 * [ console] ( #console )
2121 * [ control-flow] ( #control-flow )
2222 * [ declarations] ( #declarations )
23- * [ events] ( #events )
2423 * [ functions] ( #functions )
24+ * [ events] ( #events )
2525 * [ iterables] ( #iterables )
2626 * [ json] ( #json )
2727 * [ loops] ( #loops )
@@ -90,7 +90,7 @@ ${1:assert}.ifError(${2:err})${0}
9090${1 : assert}.throws (${2 : actual}, ${3 : expected})${0 }
9191```
9292
93- [ back to ToC ] ( #table-of-contents )
93+ ** [ back to top ] ( #table-of-contents ) **
9494
9595### async
9696> All [ async] ( ./snippets/async.cson ) snippets
@@ -133,7 +133,7 @@ ${1:promise}.catch((${2:err}) => {${0}})
133133.catch (($ {1 : err}) => {${0 }})
134134```
135135
136- [ back to ToC ] ( #table-of-contents )
136+ ** [ back to top ] ( #table-of-contents ) **
137137
138138### classes
139139> All [ classes] ( ./snippets/classes.cson ) snippets
@@ -186,7 +186,7 @@ function ${1:ClassName} (${2:args}) {
186186}
187187```
188188
189- [ back to ToC ] ( #table-of-contents )
189+ ** [ back to top ] ( #table-of-contents ) **
190190
191191### console
192192> All [ console] ( ./snippets/console.cson ) snippets
@@ -215,7 +215,7 @@ console.warn(${0})
215215console .dir (${0 })
216216```
217217
218- [ back to ToC ] ( #table-of-contents )
218+ ** [ back to top ] ( #table-of-contents ) **
219219
220220### control-flow
221221> All [ control-flow] ( ./snippets/control-flow.cson ) snippets
@@ -286,7 +286,7 @@ try {
286286}
287287```
288288
289- [ back to ToC ] ( #table-of-contents )
289+ ** [ back to top ] ( #table-of-contents ) **
290290
291291### declarations
292292> All [ declarations] ( ./snippets/declarations.cson ) snippets
@@ -367,48 +367,7 @@ const ${1:name} = [
367367]
368368```
369369
370- [ back to ToC] ( #table-of-contents )
371-
372- ### events
373- > All [ events] ( ./snippets/events.cson ) snippets
374-
375- #### ` on⇥ ` on event handler
376-
377- ``` js
378- ${1 : emitter}.on (' ${2:event}' , ${3 : args})
379- ```
380-
381- #### ` .on⇥ ` chain .on
382-
383- ``` js
384- .on (' ${1:event}' , ${2 : handler})
385- ```
386-
387- #### ` once⇥ ` once event handler
388-
389- ``` js
390- ${1 : emitter}.once (' ${2:event}' , ${3 : args})
391- ```
392-
393- #### ` .once⇥ ` chain .once
394-
395- ``` js
396- .once (' ${1:event}' , ${2 : handler})
397- ```
398-
399- #### ` emit⇥ ` emit event
400-
401- ``` js
402- ${1 : emitter}.emit (' ${2:event}' , ${3 : args})
403- ```
404-
405- #### ` .emit⇥ ` chain .emit
406-
407- ``` js
408- .emit (' ${1:event}' , ${2 : args})
409- ```
410-
411- [ back to ToC] ( #table-of-contents )
370+ ** [ back to top] ( #table-of-contents ) **
412371
413372### functions
414373> All [ functions] ( ./snippets/functions.cson ) snippets
@@ -487,7 +446,48 @@ ${1:fn}.call(${2:this}, ${3:args})
487446${1 : fn}.bind (${2 : this }, ${3 : args})
488447```
489448
490- [ back to ToC] ( #table-of-contents )
449+ ** [ back to top] ( #table-of-contents ) **
450+
451+ ### events
452+ > All [ events] ( ./snippets/events.cson ) snippets
453+
454+ #### ` on⇥ ` on event handler
455+
456+ ``` js
457+ ${1 : emitter}.on (' ${2:event}' , ${3 : args})
458+ ```
459+
460+ #### ` .on⇥ ` chain .on
461+
462+ ``` js
463+ .on (' ${1:event}' , ${2 : handler})
464+ ```
465+
466+ #### ` once⇥ ` once event handler
467+
468+ ``` js
469+ ${1 : emitter}.once (' ${2:event}' , ${3 : args})
470+ ```
471+
472+ #### ` .once⇥ ` chain .once
473+
474+ ``` js
475+ .once (' ${1:event}' , ${2 : handler})
476+ ```
477+
478+ #### ` emit⇥ ` emit event
479+
480+ ``` js
481+ ${1 : emitter}.emit (' ${2:event}' , ${3 : args})
482+ ```
483+
484+ #### ` .emit⇥ ` chain .emit
485+
486+ ``` js
487+ .emit (' ${1:event}' , ${2 : args})
488+ ```
489+
490+ ** [ back to top] ( #table-of-contents ) **
491491
492492### iterables
493493> All [ iterables] ( ./snippets/iterables.cson ) snippets
@@ -580,7 +580,7 @@ ${1:iterable}.some(${2:iterator})
580580.some (${1 : iterator})
581581```
582582
583- [ back to ToC ] ( #table-of-contents )
583+ ** [ back to top ] ( #table-of-contents ) **
584584
585585### json
586586> All [ json] ( ./snippets/json.cson ) snippets
@@ -603,7 +603,7 @@ ${1:iterable}.some(${2:iterator})
603603" ${1:key}" : true
604604```
605605
606- [ back to ToC ] ( #table-of-contents )
606+ ** [ back to top ] ( #table-of-contents ) **
607607
608608### loops
609609> All [ loops] ( ./snippets/loops.cson ) snippets
@@ -654,7 +654,7 @@ while (i < len) {
654654}
655655```
656656
657- [ back to ToC ] ( #table-of-contents )
657+ ** [ back to top ] ( #table-of-contents ) **
658658
659659### misc
660660> All [ misc] ( ./snippets/misc.cson ) snippets
@@ -734,7 +734,7 @@ function fixture () {
734734}${0 }
735735```
736736
737- [ back to ToC ] ( #table-of-contents )
737+ ** [ back to top ] ( #table-of-contents ) **
738738
739739### modules-commonjs
740740> All [ modules-commonjs] ( ./snippets/modules-commonjs.cson ) snippets
@@ -775,7 +775,7 @@ module.exports = ${1:value}
775775module .exports = exports [' default' ] = ${1 : value}
776776```
777777
778- [ back to ToC ] ( #table-of-contents )
778+ ** [ back to top ] ( #table-of-contents ) **
779779
780780### modules-es2015
781781> All [ modules-es2015] ( ./snippets/modules-es2015.cson ) snippets
@@ -810,7 +810,7 @@ import ${2:*} as ${3:name} from '${1:pkg}'${4}
810810import { $2 } from ' ${1:pkg}' ${3}
811811```
812812
813- [ back to ToC ] ( #table-of-contents )
813+ ** [ back to top ] ( #table-of-contents ) **
814814
815815### objects
816816> All [ objects] ( ./snippets/objects.cson ) snippets
@@ -853,7 +853,7 @@ Object.assign(${1:dest}, ${2:source})${0}
853853Object .keys (${1 : obj})${0 }
854854```
855855
856- [ back to ToC ] ( #table-of-contents )
856+ ** [ back to top ] ( #table-of-contents ) **
857857
858858### returns
859859> All [ returns] ( ./snippets/returns.cson ) snippets
@@ -908,7 +908,7 @@ return new Promise((resolve${1:, reject}) => {
908908})
909909```
910910
911- [ back to ToC ] ( #table-of-contents )
911+ ** [ back to top ] ( #table-of-contents ) **
912912
913913### testing
914914> All [ testing] ( ./snippets/testing.cson ) snippets
@@ -937,7 +937,7 @@ ${1:test}('${2:description}', (${3:t}) => {
937937})
938938```
939939
940- [ back to ToC ] ( #table-of-contents )
940+ ** [ back to top ] ( #table-of-contents ) **
941941
942942### timers
943943> All [ timers] ( ./snippets/timers.cson ) snippets
@@ -974,7 +974,7 @@ setImmediate(() => {
974974})
975975```
976976
977- [ back to ToC ] ( #table-of-contents )
977+ ** [ back to top ] ( #table-of-contents ) **
978978
979979### types
980980> All [ types] ( ./snippets/types.cson ) snippets
@@ -1057,7 +1057,7 @@ ${1:source} instanceof ${2:Object}
10571057Array .isArray (${1 : source})
10581058```
10591059
1060- [ back to ToC ] ( #table-of-contents )
1060+ ** [ back to top ] ( #table-of-contents ) **
10611061
10621062## Related
10631063- [ always-done] ( https://www.npmjs.com/package/always-done ) : Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement… [ more] ( https://github.com/hybridables/always-done#readme ) | [ homepage] ( https://github.com/hybridables/always-done#readme " Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement for [async-done][] - pass 100% of its tests plus more ")
0 commit comments