Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

uint8arrays

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uint8arrays - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

dist/index.min.js

2

dist/src/from-string.d.ts

@@ -1,2 +0,2 @@

import { SupportedEncodings } from './util/bases.js';
import { type SupportedEncodings } from './util/bases.js';
export type { SupportedEncodings };

@@ -3,0 +3,0 @@ /**

@@ -0,3 +1,3 @@

import { asUint8Array } from './util/as-uint8array.js';
import bases from './util/bases.js';
import { asUint8Array } from './util/as-uint8array.js';
/**

@@ -4,0 +4,0 @@ * Create a `Uint8Array` from the passed string

@@ -1,2 +0,2 @@

import { SupportedEncodings } from './util/bases.js';
import { type SupportedEncodings } from './util/bases.js';
export type { SupportedEncodings };

@@ -3,0 +3,0 @@ /**

@@ -0,3 +1,3 @@

import { bases } from 'multiformats/basics';
import type { MultibaseCodec } from 'multiformats';
import { bases } from 'multiformats/basics';
export type SupportedEncodings = 'utf8' | 'utf-8' | 'hex' | 'latin1' | 'ascii' | 'binary' | keyof typeof bases;

@@ -4,0 +4,0 @@ declare const BASES: Record<SupportedEncodings, MultibaseCodec<any>>;

@@ -43,3 +43,3 @@ import { bases } from 'multiformats/basics';

latin1: ascii,
ascii: ascii,
ascii,
binary: ascii,

@@ -46,0 +46,0 @@ ...bases

{
"name": "uint8arrays",
"version": "4.0.3",
"version": "4.0.4",
"description": "Utility functions to make dealing with Uint8Arrays easier",

@@ -15,6 +15,2 @@ "author": "Alex Potsides <alex@achingbrain.net>",

},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"type": "module",

@@ -40,3 +36,3 @@ "types": "./dist/src/index.d.ts",

"src",
"dist/src",
"dist",
"!dist/test",

@@ -180,3 +176,4 @@ "!**/*.tsbuildinfo"

"release": "aegir release",
"build": "aegir build"
"build": "aegir build",
"dep-check": "aegir dep-check"
},

@@ -188,5 +185,5 @@ "dependencies": {

"@types/benchmark": "^2.1.1",
"aegir": "^37.5.5",
"aegir": "^39.0.9",
"benchmark": "^2.1.4"
}
}
# uint8arrays <!-- omit in toc -->
[![codecov](https://img.shields.io/codecov/c/github/achingbrain/uint8arrays.svg?style=flat-square)](https://codecov.io/gh/achingbrain/uint8arrays)
[![CI](https://img.shields.io/github/workflow/status/achingbrain/uint8arrays/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/achingbrain/uint8arrays/actions/workflows/js-test-and-release.yml)
[![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/uint8arrays/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/achingbrain/uint8arrays/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

@@ -11,2 +11,3 @@ > Utility functions to make dealing with Uint8Arrays easier

- [Install](#install)
- [Browser `<script>` tag](#browser-script-tag)
- [API](#api)

@@ -19,3 +20,3 @@ - [alloc(size)](#allocsize)

- [Example](#example-2)
- [concat(arrays, [length])](#concatarrays-length)
- [concat(arrays, \[length\])](#concatarrays-length)
- [Example](#example-3)

@@ -31,3 +32,3 @@ - [equals(a, b)](#equalsa-b)

- [License](#license)
- [Contribute](#contribute)
- [Contribution](#contribution)

@@ -40,23 +41,10 @@ ## Install

- [Install](#install)
- [API](#api)
- [alloc(size)](#allocsize)
- [Example](#example)
- [allocUnsafe(size)](#allocunsafesize)
- [Example](#example-1)
- [compare(a, b)](#comparea-b)
- [Example](#example-2)
- [concat(arrays, \[length])](#concatarrays-length)
- [Example](#example-3)
- [equals(a, b)](#equalsa-b)
- [Example](#example-4)
- [fromString(string, encoding = 'utf8')](#fromstringstring-encoding--utf8)
- [Example](#example-5)
- [toString(array, encoding = 'utf8')](#tostringarray-encoding--utf8)
- [Example](#example-6)
- [xor(a, b)](#xora-b)
- [Example](#example-7)
- [License](#license)
- [Contribute](#contribute)
### Browser `<script>` tag
Loading this module through a script tag will make it's exports available as `Uint8arrays` in the global namespace.
```html
<script src="https://unpkg.com/uint8arrays/dist/index.min.js"></script>
```
## API

@@ -206,4 +194,4 @@

## Contribute
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

@@ -1,3 +0,3 @@

import bases, { SupportedEncodings } from './util/bases.js'
import { asUint8Array } from './util/as-uint8array.js'
import bases, { type SupportedEncodings } from './util/bases.js'

@@ -4,0 +4,0 @@ export type { SupportedEncodings }

@@ -1,2 +0,2 @@

import bases, { SupportedEncodings } from './util/bases.js'
import bases, { type SupportedEncodings } from './util/bases.js'

@@ -3,0 +3,0 @@ export type { SupportedEncodings }

@@ -1,4 +0,4 @@

import type { MultibaseCodec } from 'multiformats'
import { bases } from 'multiformats/basics'
import { allocUnsafe } from '../alloc.js'
import type { MultibaseCodec } from 'multiformats'

@@ -53,3 +53,3 @@ function createCodec (name: string, prefix: string, encode: (buf: Uint8Array) => string, decode: (str: string) => Uint8Array): MultibaseCodec<any> {

latin1: ascii,
ascii: ascii,
ascii,
binary: ascii,

@@ -56,0 +56,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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