Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@thisisagile/easy

Package Overview
Dependencies
Maintainers
2
Versions
1266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thisisagile/easy - npm Package Compare versions

Comparing version 1.8.8 to 1.8.9

dist/services/RequestProvider.d.ts

13

dist/services/RestResult.js

@@ -26,10 +26,9 @@ "use strict";

exports.isRestResult = isRestResult;
const toRestResult = (payload) => {
return utils_1.choose(payload)
.case(p => !p, () => data())
.case(p => p.data && p.data.items, p => data(p.data.items))
.case(p => p.error && p.error.errors, p => error(p.error.errors))
.else(p => data(List_1.toList(p)));
};
const toRestResult = (payload) => utils_1.choose(payload)
.case(p => !p, () => data())
.case(p => types_1.isResult(p), p => error([p]))
.case(p => p.error && p.error.errors, p => error(p.error.errors))
.case(p => p.data && p.data.items, p => data(p.data.items))
.else(p => data(List_1.toList(p)));
exports.toRestResult = toRestResult;
//# sourceMappingURL=RestResult.js.map
{
"name": "@thisisagile/easy",
"version": "1.8.8",
"version": "1.8.9",
"description": "Straightforward library for building domain-driven microservice architectures",

@@ -5,0 +5,0 @@ "author": "Sander Hoogendoorn",

@@ -1,2 +0,2 @@

import { isDefined, Json, Result } from '../types';
import { isDefined, isResult, Json, Result } from '../types';
import { choose } from '../utils';

@@ -29,8 +29,8 @@ import { list, List, toList } from '../types/List';

export const toRestResult = (payload?: any | any[]): RestResult => {
return choose<RestResult, any>(payload)
export const toRestResult = (payload?: any | any[]): RestResult =>
choose<RestResult, any>(payload)
.case(p => !p, () => data())
.case(p => isResult(p), p => error([p]))
.case(p => p.error && p.error.errors, p => error(p.error.errors))
.case(p => p.data && p.data.items, p => data(p.data.items))
.case(p => p.error && p.error.errors, p => error(p.error.errors))
.else(p => data(toList(p)));
};

Sorry, the diff of this file is not supported yet

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