Comparing version 5.0.0 to 5.0.1
The MIT License (MIT) | ||
Copyright (c) 2015-2019 the native web. | ||
Copyright (c) 2015-2020 the native web. | ||
@@ -4,0 +4,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
{ | ||
"name": "defekt", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "defekt is custom errors made simple.", | ||
@@ -29,4 +29,5 @@ "contributors": [ | ||
"devDependencies": { | ||
"assertthat": "5.0.1", | ||
"roboter": "9.2.0" | ||
"assertthat": "5.1.0", | ||
"roboter": "11.0.12", | ||
"semantic-release-configuration": "1.0.16" | ||
}, | ||
@@ -33,0 +34,0 @@ "repository": { |
@@ -9,9 +9,9 @@ # defekt | ||
| Category | Status | | ||
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | ||
| Version | [![npm](https://img.shields.io/npm/v/defekt)](https://www.npmjs.com/package/defekt) | | ||
| Dependencies | ![David](https://img.shields.io/david/thenativeweb/defekt) | | ||
| Dev dependencies | ![David](https://img.shields.io/david/dev/thenativeweb/defekt) | | ||
| Build | [![CircleCI](https://img.shields.io/circleci/build/github/thenativeweb/defekt)](https://circleci.com/gh/thenativeweb/defekt/tree/master) | | ||
| License | ![GitHub](https://img.shields.io/github/license/thenativeweb/defekt) | | ||
| Category | Status | | ||
| ---------------- | --------------------------------------------------------------------------------------------------- | | ||
| Version | [![npm](https://img.shields.io/npm/v/defekt)](https://www.npmjs.com/package/defekt) | | ||
| Dependencies | ![David](https://img.shields.io/david/thenativeweb/defekt) | | ||
| Dev dependencies | ![David](https://img.shields.io/david/dev/thenativeweb/defekt) | | ||
| Build | ![GitHub Actions](https://github.com/thenativeweb/defekt/workflows/Release/badge.svg?branch=master) | | ||
| License | ![GitHub](https://img.shields.io/github/license/thenativeweb/defekt) | | ||
@@ -103,2 +103,21 @@ ## Installation | ||
### Grouping errors | ||
Over time you may get more and more error definitions, which results in a lengthy `errors` object. To group errors, add appropriate properties to the `errors` object and call the `defekt` function multiple times: | ||
```javascript | ||
const errors = { | ||
common: defekt({ | ||
ArgumentNull: {}, | ||
InvalidOperation: {} | ||
// ... | ||
}), | ||
http: defekt({ | ||
BadRequest: {} | ||
// ... | ||
}) | ||
}; | ||
``` | ||
## Running the build | ||
@@ -105,0 +124,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10262
16
127
128
3