File tree 3 files changed +27
-18
lines changed
3 files changed +27
-18
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ var util = require("util");
9
9
// Node.js)
10
10
var Lazy = require ( "./lazy.js" ) ;
11
11
12
+ var isHarmonySupported = require ( './util.js' ) . isHarmonySupported ;
13
+ if ( isHarmonySupported ( ) ) {
14
+ require ( './experimental/lazy.es6.js' ) ;
15
+ }
16
+
12
17
/**
13
18
* @constructor
14
19
*/
Original file line number Diff line number Diff line change 1
1
var fs = require ( "fs" ) ,
2
2
path = require ( "path" ) ,
3
3
Stream = require ( "stream" ) ,
4
- MemoryStream = require ( "memorystream" ) ;
4
+ MemoryStream = require ( "memorystream" ) ,
5
+ util = require ( '../util.js' ) ;
5
6
6
7
require ( "./lazy_spec.js" ) ;
7
8
require ( "./map_spec.js" ) ;
@@ -29,27 +30,11 @@ require("./watch_spec.js");
29
30
require ( "./merge_spec.js" ) ;
30
31
require ( "./join_spec.js" ) ;
31
32
32
- if ( isHarmonySupported ( ) ) {
33
+ if ( util . isHarmonySupported ( ) ) {
33
34
require ( '../experimental/lazy.es6.js' ) ;
34
35
require ( './es6_spec.js' ) ;
35
36
}
36
37
37
- function isHarmonySupported ( ) {
38
- var version = process . version . split ( '.' ) ;
39
-
40
- // We'll only bother checking Node versions 0.10 and greater
41
- if ( version [ 0 ] == 'v0' && Number ( version [ 1 ] ) < 10 ) {
42
- return false ;
43
- }
44
-
45
- try {
46
- eval ( '(function*() {})' ) ;
47
- return true ;
48
- } catch ( e ) {
49
- return false ;
50
- }
51
- }
52
-
53
38
// Sequence types
54
39
require ( "./string_like_sequence_spec.js" ) ;
55
40
require ( "./async_sequence_spec.js" ) ;
Original file line number Diff line number Diff line change
1
+ function isHarmonySupported ( ) {
2
+ var version = process . version . split ( '.' ) ;
3
+
4
+ // We'll only bother checking Node versions 0.10 and greater
5
+ if ( version [ 0 ] == 'v0' && Number ( version [ 1 ] ) < 10 ) {
6
+ return false ;
7
+ }
8
+
9
+ try {
10
+ eval ( '(function*() {})' ) ;
11
+ return true ;
12
+ } catch ( e ) {
13
+ return false ;
14
+ }
15
+ }
16
+
17
+ module . exports = {
18
+ isHarmonySupported : isHarmonySupported
19
+ } ;
You can’t perform that action at this time.
0 commit comments