File tree 6 files changed +11
-14
lines changed
6 files changed +11
-14
lines changed Original file line number Diff line number Diff line change 12
12
node-version :
13
13
- 14
14
14
- 12
15
- - 10
16
15
steps :
17
16
- uses : actions/checkout@v2
18
- - uses : actions/setup-node@v1
17
+ - uses : actions/setup-node@v2
19
18
with :
20
19
node-version : ${{ matrix.node-version }}
21
20
- run : npm install
Original file line number Diff line number Diff line change @@ -3,12 +3,10 @@ Detect whether the terminal supports Unicode.
3
3
4
4
@example
5
5
```
6
- import isUnicodeSupported = require( 'is-unicode-supported') ;
6
+ import isUnicodeSupported from 'is-unicode-supported';
7
7
8
8
isUnicodeSupported();
9
9
//=> true
10
10
```
11
11
*/
12
- declare function isUnicodeSupported ( ) : boolean ;
13
-
14
- export = isUnicodeSupported ;
12
+ export default function isUnicodeSupported ( ) : boolean ;
Original file line number Diff line number Diff line change 1
- 'use strict' ;
2
-
3
- module . exports = ( ) => {
1
+ export default function isUnicodeSupported ( ) {
4
2
if ( process . platform !== 'win32' ) {
5
3
return true ;
6
4
}
@@ -10,4 +8,4 @@ module.exports = () => {
10
8
process . env . TERM_PROGRAM === 'vscode' ||
11
9
process . env . TERM === 'xterm-256color' ||
12
10
process . env . TERM === 'alacritty' ;
13
- } ;
11
+ }
Original file line number Diff line number Diff line change 1
1
import { expectType } from 'tsd' ;
2
- import isUnicodeSupported = require ( '.' ) ;
2
+ import isUnicodeSupported from './index.js' ;
3
3
4
4
expectType < boolean > ( isUnicodeSupported ( ) ) ;
Original file line number Diff line number Diff line change 10
10
11
11
"url" : " https://sindresorhus.com"
12
12
},
13
+ "type" : " module" ,
14
+ "exports" : " ./index.js" ,
13
15
"engines" : {
14
- "node" : " >=10 "
16
+ "node" : " >=12 "
15
17
},
16
18
"scripts" : {
17
19
"test" : " xo && ava && tsd"
34
36
" detection"
35
37
],
36
38
"devDependencies" : {
37
- "ava" : " ^2.4 .0" ,
39
+ "ava" : " ^3.15 .0" ,
38
40
"tsd" : " ^0.14.0" ,
39
41
"xo" : " ^0.38.2"
40
42
}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ $ npm install is-unicode-supported
15
15
## Usage
16
16
17
17
``` js
18
- const isUnicodeSupported = require ( ' is-unicode-supported' ) ;
18
+ import isUnicodeSupported from ' is-unicode-supported' ;
19
19
20
20
isUnicodeSupported ();
21
21
// => true
You can’t perform that action at this time.
0 commit comments