How to use the isNativeEncoding function from buffer

Find comprehensive JavaScript buffer.isNativeEncoding code examples handpicked from public code repositorys.

91
92
93
94
95
96
97
98
99
100

// -- Buffer ---------------------------------------------------------------

original.BufferIsEncoding = Buffer.isEncoding;
Buffer.isEncoding = function(encoding) {
    return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding);
}

original.BufferByteLength = Buffer.byteLength;
Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) {
fork icon0
star icon0
watch icon2