This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@stitch-it/convert
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

An utility library for Stitch It runtime that provides bunch of conversion functions.

Usage

Either import individual functions:

import { convertTextToBase64 } from '@stitch-it/convert';

export default async function(event: any, context: Context): Promise<void> {
	console.log(convertTextToBase64('HELLO WORLD', 'utf8'));
}

or import the entire namespace:

import { Convert } from '@stitch-it/convert';

export default async function(event: any, context: Context): Promise<void> {
	console.log(Convert.textToBase64('HELLO WORLD', 'utf8'));
}

Available functions

convertBase64ToBuffer(base64: string): UInt8Array;
convertBase64ToText(base64: string, encoding?: string = 'utf8'): string;
convertBufferToBase64(buffer: ArrayBuffer): string;
convertBufferToText(buffer: ArrayBuffer, encoding?: string = 'utf8'): string;
convertTextToBase64(text: string, encoding?: string = 'utf8'): string;
convertTextToBuffer(text: string, encoding?: string = 'utf8'): UInt8Array;
convertTextToText(text: string, sourceEncoding: string, targetEncoding?: string = 'utf8');

Readme

Keywords

none

Package Sidebar

Install

npm i @stitch-it/convert

Weekly Downloads

0

Version

0.1.2

License

UNLICENSED

Unpacked Size

11.6 kB

Total Files

6

Last publish

Collaborators

  • eknoll
  • jsaks
  • jtrumm
  • mtapsi
  • ssarapov
  • theshumanator