Skip to main content
Module

x/core/mod.ts

Some auxiliary functions and classes of deno.
Latest
import * as core from "https://deno.land/x/core@0.1.9/mod.ts";

Variables

AES encryption and decryption algorithm: AES-CBC encoding: base64

JWT encryption and decryption algorithm: RSA-OAEP

RSA encryption and decryption algorithm: RSA-OAEP encoding: base64

Functions

Initials upper case

Format the number of bytes to be easily recognizable by humans

Format date with pattern string

Format template string with placeholder

Determine whether it is a plain object (the object created by {} or new Object)

Merge two arrays by the specify function.

Deep merge multiple objects

分页助手

Generate a random number between [a,b]

Generate a random string with specified length

SHA-1 hash encryption algorithm: SHA-1

Strip html tags

  1. Identify complete tag matches, e.g. "b" tag will not match "br", "body".
  2. Identify empty tags, e.g. "<>" will not be striped.
  3. Identify the start and end tag cannot be spaces, e.g. "a < b and c > d" will not be striped.

Truncate a Chinese-English mixed string of specified length A Chinese character is calculated by two characters

Random UUID without '-'