Comparing version 1.0.6 to 1.0.7
@@ -12,2 +12,5 @@ "use strict"; | ||
class Article { | ||
static parse(raw) { | ||
return new Article(raw.json); | ||
} | ||
/** | ||
@@ -96,3 +99,3 @@ * Creates a new instance of Article. | ||
get images() { | ||
return this.json.images.map((image) => new Image_1.default(image)); | ||
return this.json.images.map((image) => Image_1.default.parse(image)); | ||
} | ||
@@ -99,0 +102,0 @@ /** |
@@ -11,2 +11,8 @@ "use strict"; | ||
class Image { | ||
static parse(raw) { | ||
if (raw.json) { | ||
return new Image(raw.json); | ||
} | ||
return new Image(raw); | ||
} | ||
/** | ||
@@ -13,0 +19,0 @@ * Creates a new instance of Image. |
{ | ||
"name": "stuft", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "A news api.", | ||
@@ -8,3 +8,3 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"build": "tsc" | ||
"build": "tsc --watch" | ||
}, | ||
@@ -11,0 +11,0 @@ "author": "JP Sheehan", |
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
18954
523