react-native-mmkv
Version:
The fastest key/value storage for React Native. ~30x faster than AsyncStorage! Works on Android, iOS and Web.
19 lines (18 loc) • 479 B
JavaScript
/* global TextEncoder */
export function createTextEncoder() {
if (global.TextEncoder != null) {
return new global.TextEncoder();
} else {
return {
encode: () => {
throw new Error('TextEncoder is not supported in this environment!');
},
encodeInto: () => {
throw new Error('TextEncoder is not supported in this environment!');
},
encoding: 'utf-8'
};
}
}
//# sourceMappingURL=createTextEncoder.js.map
;