Comparing version 0.2.1 to 0.3.0
@@ -0,1 +1,4 @@ | ||
0.3.0 - September 25, 2014 | ||
- Allow remote urls to be loaded | ||
0.2.1 - July 8, 2014 | ||
@@ -2,0 +5,0 @@ - Critical bugfix |
{ | ||
"name": "raml2obj", | ||
"description": "RAML to object", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Kevin Renskers", |
@@ -71,4 +71,4 @@ #!/usr/bin/env node | ||
if (typeof(source) === 'string') { | ||
if (fs.existsSync(source)) { | ||
// Parse as file | ||
if (fs.existsSync(source) || source.indexOf('http') === 0) { | ||
// Parse as file or url | ||
raml.loadFile(source).then(onSuccess, onError); | ||
@@ -88,3 +88,3 @@ } else { | ||
} else { | ||
onError(new Error('sourceToRamlObj: You must supply either file, data or obj as source.')); | ||
onError(new Error('sourceToRamlObj: You must supply either file, url, data or obj as source.')); | ||
} | ||
@@ -91,0 +91,0 @@ } |
@@ -17,3 +17,3 @@ # RAML to object | ||
// source can either be a filename, file contents (string) or parsed RAML object | ||
// source can either be a filename, url, file contents (string) or parsed RAML object | ||
raml2obj.parse(source, onSuccess, onError); | ||
@@ -20,0 +20,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
6458