
Product
Introducing Webhook Events for Pull Request Scans
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
@jackdouglas/ts-utilities
Advanced tools
Mostly Notify Code
Name | Purpose | Type | Default |
---|---|---|---|
exact | Requires the object to match exactly to the contraint keys provided | boolean | false |
required | Requires the object to contain at least the items in the array | string[] | null |
whitelisted | Requires the object to contain only items that are in the array | string[] | null |
Name | Purpose | Type | Default |
---|---|---|---|
email | Requires the specified value pass the email specfic regex | boolean | false |
lowercase | Requires the value to be lowercase only | boolean | false |
uppercase | Requires the value to be uppercase only | boolean | false |
number | Requires the value to be number only | boolean | false |
length | Requires the value to meet the min or max length | { min?: number, max?: number } | null |
nullable | Specifies if the value is allow to be unset or null | boolean | true |
trim | Removes whitespace from the string | boolean | true |
Also bundled is a logging utility
This logging utility exposes the following methods
Name | Purpose |
---|---|
Log | console.log but with the twist of color,time and other logger benefits |
Error | console.error same as log with different colors, and registers as an error on our error tracking |
Debug | console.log nearly the same as Log but with the twist of an env variable check for DEBUG="jack:*" which will allow the output of this log line |
Included is an express middleware to handle logging of request details
• Request Method
• Request Path
• Status Code
• Response Time in ms
• Client IP Address
• Response Size soonB/KB/MB/GB
This request utility exposes the following methods
Name | Response Format | Parameters | |
---|---|---|---|
Success | { success: true, data } | res: Response, status: number, data?: any | |
Failed | { error: true, code, data } | res: Response, status: number, code: string, data?: any | |
Missing | { error: true, code: 'route_not_found' } | res: Response | |
Catch | { error: true, code: 'catch', data } | res: Response, data?: any |
FAQs
Jack's Utilities & Functions
We found that @jackdouglas/ts-utilities demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.
Product
A single platform for static analysis, secrets detection, container scanning, and CVE checks—built on trusted open source tools, ready to run out of the box.