New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

result-tsk

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

result-tsk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

package.json
{
"name": "result-tsk",
"version": "1.0.1",
"version": "1.0.2",
"description": "tool for use with or without NodeTskeleton template project",

@@ -10,7 +10,4 @@ "repository": {

"keywords": [
"node",
"ts",
"skeleton",
"nodejs",
"typescript",
"result",
"tskeleton",
"tool"

@@ -31,3 +28,3 @@ ],

"build": "rm -rf lib/* && tsc --sourceMap false",
"publish": "npm run build && npm publish"
"upload": "npm run build && npm publish"
},

@@ -34,0 +31,0 @@ "devDependencies": {

@@ -9,3 +9,3 @@ # Result tool 🧰

### Using Result
## Using Result

@@ -15,3 +15,3 @@ `Result` is a `tool` that helps us control the flow of our `use cases` and allows us to `manage the response`, be it an `object`, an `array` of objects, a `message` or an `error` as follows:

```ts
import { IResult } from "result-tsk";
import { IResultT, ResultT } from "result-tsk";

@@ -23,5 +23,5 @@ export class UseCaseProductGet extends BaseUseCase {

async Execute(idMask: string): Promise<IResult<ProductDto>> {
async Execute(idMask: string): Promise<IResultT<ProductDto>> {
// We create the instance of our type of result at the beginning of the use case.
const result = new Result<ProductDto>();
const result = new ResultT<ProductDto>();
// With the resulting object we can control validations within other functions.

@@ -57,3 +57,3 @@ if (!this.validator.IsValidEntry(result, { productMaskId: idMask })) {

The `result` object can help you in unit tests as shown below:
The `result object` can help you in `unit tests` as shown below:

@@ -60,0 +60,0 @@ ```ts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc