File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 7
7
This package provides [ TextEncoder] [ ] and [ TextDecoder] [ ] [ Encoding Standard] [ ]
8
8
APIs in a universal package. In the browsers it just exposes existing globals,
9
9
in nodejs it exposes globals in newer node versions and ones from ` util ` module
10
- in older versions.
10
+ in older versions, and in the React Native environments it exposes these from
11
+ the [ @sinonjs/text-encoding ] ( https://www.npmjs.com/package/text-encoding )
12
+ polyfill (installed as an optional dependency).
11
13
12
14
Package also works as ES module and CommonJS module.
13
15
Original file line number Diff line number Diff line change 8
8
],
9
9
"type" : " module" ,
10
10
"browser" : " ./src/lib.browser.js" ,
11
+ "react-native" : " ./src/lib.react-native.js" ,
11
12
"main" : " ./src/lib.cjs" ,
12
13
"module" : " ./src/lib.js" ,
13
14
"types" : " ./src/lib.d.ts" ,
35
36
"devDependencies" : {
36
37
"mocha" : " 8.2.1" ,
37
38
"playwright-test" : " 1.2.0"
39
+ },
40
+ "optionalDependencies" : {
41
+ "@sinonjs/text-encoding" : " 0.7.1"
38
42
}
39
43
}
Original file line number Diff line number Diff line change
1
+ "use strict"
2
+
3
+ const textEncoding = require ( "@sinonjs/text-encoding" )
4
+ exports . TextEncoder = textEncoding . TextEncoder
5
+ exports . TextDecoder = textEncoding . TextDecoder
You can’t perform that action at this time.
0 commit comments