Socket
Socket
Sign inDemoInstall

@apache-arrow/ts

Package Overview
Dependencies
Maintainers
6
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apache-arrow/ts - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

package.json
{
"version": "4.0.0",
"version": "4.0.1",
"name": "@apache-arrow/ts",

@@ -4,0 +4,0 @@ "browser": "Arrow.dom.ts",

@@ -18,3 +18,2 @@ // Licensed to the Apache Software Foundation (ASF) under one

import { toUint8Array } from './buffer';
import {

@@ -25,26 +24,8 @@ TextDecoder as TextDecoderPolyfill,

/** @ignore @suppress {missingRequire} */
const _Buffer = eval("typeof Buffer === 'function' ? Buffer : null");
const decoder = new (typeof TextDecoder !== 'undefined' ? TextDecoder : TextDecoderPolyfill)('utf-8');
/** @ignore */
const useNativeEncoders = typeof TextDecoder === 'function' && typeof TextEncoder === 'function';
export const decodeUtf8 = (buffer?: ArrayBuffer | ArrayBufferView) => decoder.decode(buffer);
const encoder = new (typeof TextEncoder !== 'undefined' ? TextEncoder : TextEncoderPolyfill)();
/** @ignore */
export const decodeUtf8 = ((TextDecoder) => {
if (useNativeEncoders || !_Buffer) {
const decoder = new TextDecoder('utf-8');
return (buffer?: ArrayBuffer | ArrayBufferView) => decoder.decode(buffer);
}
return (input: ArrayBufferLike | ArrayBufferView) => {
const { buffer, byteOffset, length } = toUint8Array(input);
return _Buffer.from(buffer, byteOffset, length).toString();
};
})(typeof TextDecoder !== 'undefined' ? TextDecoder : TextDecoderPolyfill);
/** @ignore */
export const encodeUtf8 = ((TextEncoder) => {
if (useNativeEncoders || !_Buffer) {
const encoder = new TextEncoder();
return (value?: string) => encoder.encode(value);
}
return (input = '') => toUint8Array(_Buffer.from(input, 'utf8'));
})(typeof TextEncoder !== 'undefined' ? TextEncoder : TextEncoderPolyfill);
export const encodeUtf8 = (value?: string) => encoder.encode(value);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc