New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@maeum/tools

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@maeum/tools

maeum miscellaneous functions

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

@maeum/tools

ts Download Status Github Star Github Issues NPM version @maeum/tools License codecov code style: prettier

The @maeum/tools is a collection of useful functions for writing APT servers.

Table of Contents

Getting Started

installation

npm install @maeum/tools --save

Feature

Encryptioner

Class to help with AES-256-CBC encryption and decryption. You can use it when writing server code to encrypt the location of an error in the response results. Certain countries may prohibit exposing the location of these errors in the response results. For example, in South Korea, sites with more than a certain number of users are not allowed to expose the location of errors to the public internet. EncryptContainer can be used to encrypt the error response location in such cases.

const encryptioner = new Encryptioner(getEncryptionerOptions());

const err = new Error('i am error raised your specific source code');

// You can use the encrypted value in logs or API responses
const encrypted = encryptioner.encrypt(
  JSON.stringify({ message: err.message, stack: err.stack }),
);
const decrypted = encryptioner.encrypt(encrypted);

Encryptioner options overview

PropertyTypeDescription
ivSizenumberSpecify the initialize vector size.
saltnumberSpecifies the maximum size of the salt to make decryption more difficult.
keystringSpecifies the encryption key.

Functions

nameDescription
noopnoop function
escapeUse to remove newline characters when logging log record
safeStringifyIf an exception is thrown when using the JSON.stringify function, execution will stop. safeStringify will return the value passed as defaultValue if an exception is thrown.
objectifyReturns only those fields from the input object that conform to the JSON specification

FAQs

Package last updated on 18 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts