api-elements
Advanced tools
Comparing version 0.2.3 to 0.2.4
# API Elements (JavaScript) CHANGELOG | ||
## 0.2.4 (2020-04-20) | ||
### Enhancements | ||
- Added `hosts` properties on `Resource` and `Transition` to access the "hosts" | ||
resources stored in the element attributes. `Cateogory` elements contain | ||
`hosts` so that you can access hosts categories from the "api" category. | ||
## 0.2.3 (2019-12-05) | ||
@@ -4,0 +12,0 @@ |
@@ -81,2 +81,11 @@ const { ArrayElement } = require('minim'); | ||
/** | ||
* @name hosts | ||
* @type ArraySlice | ||
* @memberof Category.prototype | ||
*/ | ||
get hosts() { | ||
return this.children.filter(item => item.element === 'hosts'); | ||
} | ||
metadata(value) { | ||
@@ -83,0 +92,0 @@ const metadata = this.attributes.get('metadata'); |
@@ -20,2 +20,15 @@ const { ArrayElement } = require('minim'); | ||
/** | ||
* @name hosts | ||
* @type ArraySlice | ||
* @memberof Resource.prototype | ||
*/ | ||
get hosts() { | ||
return this.attributes.get('hosts'); | ||
} | ||
set hosts(value) { | ||
this.attributes.set('hosts', value); | ||
} | ||
/** | ||
* @name href | ||
@@ -22,0 +35,0 @@ * @type StringElement |
@@ -52,2 +52,15 @@ const { ArrayElement } = require('minim'); | ||
/** | ||
* @name hosts | ||
* @type ArraySlice | ||
* @memberof Resource.prototype | ||
*/ | ||
get hosts() { | ||
return this.attributes.get('hosts'); | ||
} | ||
set hosts(value) { | ||
this.attributes.set('hosts', value); | ||
} | ||
/** | ||
* @name href | ||
@@ -54,0 +67,0 @@ * @type StringElement |
{ | ||
"name": "api-elements", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "API Elements JavaScript", | ||
@@ -25,3 +25,3 @@ "author": "Apiary.io <support@apiary.io>", | ||
"minim": "^0.23.5", | ||
"ramda": "^0.26.1" | ||
"ramda": "^0.27.0" | ||
}, | ||
@@ -36,3 +36,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "92e12bd81f6f5c873b411fa34e7df59cbe1dcc88" | ||
"gitHead": "50efa2948c1d449bf6a13bfb15b4768920813d66" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
46457
1097
0
+ Addedramda@0.27.2(transitive)
- Removedramda@0.26.1(transitive)
Updatedramda@^0.27.0