New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@blake.regalia/belt

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blake.regalia/belt - npm Package Compare versions

Comparing version 0.18.0 to 0.18.1

dist/cjs/strings.d.ts

13

dist/cjs/data.d.ts

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

import type { Base58, Base64, Base93, HexLower, JsonValue } from './types';
import type { NaiveBase58, NaiveBase64, NaiveBase93, NaiveHexLower } from './strings';
import type { JsonValue } from './types';
export declare const uuid_v4: () => string;

@@ -76,3 +77,3 @@ type Uint8ArrayConstructorParams = [] | [length: number] | [array: ArrayLike<number> | ArrayBufferLike] | [buffer: ArrayBufferLike, byteOffset?: number, length?: number];

*/
export declare const text_to_base64: (s_text: string) => Base64;
export declare const text_to_base64: (s_text: string) => NaiveBase64;
/**

@@ -132,3 +133,3 @@ * Attempts to JSON stringify the given primitive/object and subsequently UTF-8 encode it.

*/
export declare const buffer_to_hex: (atu8_buffer: Uint8Array) => HexLower;
export declare const buffer_to_hex: (atu8_buffer: Uint8Array) => NaiveHexLower;
/**

@@ -145,3 +146,3 @@ * Converts the given hex string into a buffer.

*/
export declare const buffer_to_base64: (atu8_buffer: Uint8Array) => Base64;
export declare const buffer_to_base64: (atu8_buffer: Uint8Array) => NaiveBase64;
/**

@@ -164,3 +165,3 @@ * Converts the given base64-encoded string to a buffer.

*/
export declare const buffer_to_base93: (atu8_buffer: Uint8Array) => Base93;
export declare const buffer_to_base93: (atu8_buffer: Uint8Array) => NaiveBase93;
/**

@@ -172,4 +173,4 @@ * Converts the given base93-encoded string to a buffer.

export declare const base93_to_buffer: (sx_buffer: string) => Uint8Array;
export declare const buffer_to_base58: (atu8_buffer: Uint8Array) => Base58;
export declare const buffer_to_base58: (atu8_buffer: Uint8Array) => NaiveBase58;
export declare const base58_to_buffer: (sb58_buffer: string) => Uint8Array;
export {};
export * from './belt.js';
export * from './data.js';
export * from './strings.js';
export * from './types.js';

@@ -19,3 +19,4 @@ "use strict";

__exportStar(require("./data.js"), exports);
__exportStar(require("./strings.js"), exports);
__exportStar(require("./types.js"), exports);
//# sourceMappingURL=main.js.map
import type { A } from 'ts-toolbelt';
import type { NaiveJsonString } from './strings';
/**
* An integer string
*/
export type Uint128 = `${bigint}`;
/**
* Lowercase hexadecimal string
*/
export type HexLower = A.Type<string, 'hex-lower'>;
/**
* Uppercase hexadecimal string
*/
export type HexUpper = A.Type<string, 'hex-upper'>;
/**
* Mixed case hexadecimal string
*/
export type HexMixed = HexLower | HexUpper;
/**
* Base58 string
*/
export type Base58 = A.Type<string, 'base58'>;
/**
* Base64 string
*/
export type Base64 = A.Type<string, 'base64'>;
/**
* Base93 string
*/
export type Base93 = A.Type<string, 'base93'>;
/**
* Base222 string
*/
export type Base222 = A.Type<string, 'base222'>;
/**
* JSON string
*/
export type JsonString = A.Type<string, 'json'>;
/**
* Shortcut for a very common type pattern

@@ -92,4 +57,24 @@ */

interface JSON {
parse(text: string, reviver?: (this: any, key: string, value: any) => any): JsonValue;
/**
* Converts a JavaScript Object Notation (JSON) string into an object.
* @param text A valid JSON string.
* @param reviver A function that transforms the results. This function is called for each member of the object.
* If a member contains nested objects, the nested objects are transformed before the parent object is.
*/
parse<w_revive = never>(text: string, reviver?: (this: any, key: string, value: any) => w_revive): JsonValue<w_revive>;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer A function that transforms the results.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): NaiveJsonString;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): NaiveJsonString;
}
}

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

import type { Base58, Base64, Base93, HexLower, JsonValue } from './types';
import type { NaiveBase58, NaiveBase64, NaiveBase93, NaiveHexLower } from './strings';
import type { JsonValue } from './types';
export declare const uuid_v4: () => string;

@@ -76,3 +77,3 @@ type Uint8ArrayConstructorParams = [] | [length: number] | [array: ArrayLike<number> | ArrayBufferLike] | [buffer: ArrayBufferLike, byteOffset?: number, length?: number];

*/
export declare const text_to_base64: (s_text: string) => Base64;
export declare const text_to_base64: (s_text: string) => NaiveBase64;
/**

@@ -132,3 +133,3 @@ * Attempts to JSON stringify the given primitive/object and subsequently UTF-8 encode it.

*/
export declare const buffer_to_hex: (atu8_buffer: Uint8Array) => HexLower;
export declare const buffer_to_hex: (atu8_buffer: Uint8Array) => NaiveHexLower;
/**

@@ -145,3 +146,3 @@ * Converts the given hex string into a buffer.

*/
export declare const buffer_to_base64: (atu8_buffer: Uint8Array) => Base64;
export declare const buffer_to_base64: (atu8_buffer: Uint8Array) => NaiveBase64;
/**

@@ -164,3 +165,3 @@ * Converts the given base64-encoded string to a buffer.

*/
export declare const buffer_to_base93: (atu8_buffer: Uint8Array) => Base93;
export declare const buffer_to_base93: (atu8_buffer: Uint8Array) => NaiveBase93;
/**

@@ -172,4 +173,4 @@ * Converts the given base93-encoded string to a buffer.

export declare const base93_to_buffer: (sx_buffer: string) => Uint8Array;
export declare const buffer_to_base58: (atu8_buffer: Uint8Array) => Base58;
export declare const buffer_to_base58: (atu8_buffer: Uint8Array) => NaiveBase58;
export declare const base58_to_buffer: (sb58_buffer: string) => Uint8Array;
export {};
export * from './belt.js';
export * from './data.js';
export * from './strings.js';
export * from './types.js';
export * from './belt.js';
export * from './data.js';
export * from './strings.js';
export * from './types.js';
//# sourceMappingURL=main.js.map
import type { A } from 'ts-toolbelt';
import type { NaiveJsonString } from './strings';
/**
* An integer string
*/
export type Uint128 = `${bigint}`;
/**
* Lowercase hexadecimal string
*/
export type HexLower = A.Type<string, 'hex-lower'>;
/**
* Uppercase hexadecimal string
*/
export type HexUpper = A.Type<string, 'hex-upper'>;
/**
* Mixed case hexadecimal string
*/
export type HexMixed = HexLower | HexUpper;
/**
* Base58 string
*/
export type Base58 = A.Type<string, 'base58'>;
/**
* Base64 string
*/
export type Base64 = A.Type<string, 'base64'>;
/**
* Base93 string
*/
export type Base93 = A.Type<string, 'base93'>;
/**
* Base222 string
*/
export type Base222 = A.Type<string, 'base222'>;
/**
* JSON string
*/
export type JsonString = A.Type<string, 'json'>;
/**
* Shortcut for a very common type pattern

@@ -92,4 +57,24 @@ */

interface JSON {
parse(text: string, reviver?: (this: any, key: string, value: any) => any): JsonValue;
/**
* Converts a JavaScript Object Notation (JSON) string into an object.
* @param text A valid JSON string.
* @param reviver A function that transforms the results. This function is called for each member of the object.
* If a member contains nested objects, the nested objects are transformed before the parent object is.
*/
parse<w_revive = never>(text: string, reviver?: (this: any, key: string, value: any) => w_revive): JsonValue<w_revive>;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer A function that transforms the results.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): NaiveJsonString;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): NaiveJsonString;
}
}
{
"name": "@blake.regalia/belt",
"version": "0.18.0",
"version": "0.18.1",
"repository": "github:blake-regalia/belt",

@@ -5,0 +5,0 @@ "license": "ISC",

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