1.1.0 • Published 3 years ago
carry-core v1.1.0
Usage
toJson function
The toJson function converts JavaScript objects to JSON strings while handling various corner cases and errors effectively.
The function handles special cases like Set, Map, Date, and RegExp instances, as well as circular references.
ErrorHandler class
The ErrorHandler class extends the native JavaScript Error class and provides additional functionality, such as automatically logging errors to the console.
Constructor
The ErrorHandler class constructor accepts the following parameters:
message(string): The error message.stackTrace(optional string): The stack trace of the error. If not provided, a new stack trace will be generated.
Properties
name(string): The error name, which defaults to the class name (e.g.,ErrorHandler).message(string): The error message.stackTrace(string): The error's stack trace.
License
Your chosen license (e.g., MIT, GPL, etc.)-name` with the actual name of your package and update the installation instructions if necessary. You should also choose an appropriate license for your package and replace the placeholder in the "License" section.