Comparing version 0.0.3 to 0.0.4
ChangeLog | ||
========= | ||
0.0.4 (2017-02-06) | ||
----------------- | ||
* Bugfixes. | ||
* Linting with eslint. | ||
0.0.3 (2017-02-06) | ||
@@ -5,0 +12,0 @@ ------------------ |
var url = require('url'); | ||
var Resource = require('./resource'); | ||
var request = require('request-promise-any') | ||
var request = require('request-promise-any'); | ||
var package = require('../package.json'); | ||
@@ -8,4 +8,4 @@ | ||
if (typeof requestOptions === "undefined") { | ||
requestOptions = {}; | ||
if (typeof requestOptions === 'undefined') { | ||
requestOptions = {}; | ||
} | ||
@@ -20,3 +20,3 @@ // json-promise-any setting, makes sure that we're getting whole responses | ||
'Accept' : 'application/hal+json, application/json' | ||
} | ||
}; | ||
@@ -28,3 +28,3 @@ // Parsing json by default. | ||
} | ||
}; | ||
@@ -43,4 +43,4 @@ Client.prototype = { | ||
} | ||
}; | ||
module.exports = Client; |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -6,4 +6,4 @@ var Promise = require('bluebird/js/release/promise')(); | ||
return this.then(function(resource) { | ||
return resource.follow(rel); | ||
return this.then(function(resource) { | ||
return resource.follow(rel); | ||
}); | ||
@@ -15,4 +15,4 @@ | ||
return this.then(function(resource) { | ||
return resource.followAll(rel); | ||
return this.then(function(resource) { | ||
return resource.followAll(rel); | ||
}); | ||
@@ -19,0 +19,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -6,2 +6,2 @@ var Client = require('./client.js'); | ||
return new Client(bookMark, options); | ||
} | ||
}; |
@@ -22,3 +22,3 @@ var Link = require('./link'); | ||
} | ||
}; | ||
@@ -46,3 +46,3 @@ /** | ||
} | ||
}; | ||
@@ -64,8 +64,9 @@ /** | ||
relType, | ||
embedded[link]._links.self.href; | ||
embedded[ii]._links.self.href | ||
) | ||
); | ||
} | ||
} | ||
} | ||
}; | ||
module.exports = Representation; |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -6,2 +6,3 @@ var Representation = require('./representation'); | ||
var FollowablePromise = require('./followable-promise'); | ||
var Promise = require('bluebird'); | ||
@@ -39,3 +40,3 @@ var Resource = function(client, uri) { | ||
body: body | ||
}).then(function(response) { | ||
}).then(function() { | ||
return null; | ||
@@ -55,3 +56,3 @@ }); | ||
body: body | ||
}).then(function(response) { | ||
}).then(function() { | ||
return null; | ||
@@ -101,6 +102,6 @@ }); | ||
}).then(function(response) { | ||
this.repr = new Representation( | ||
response.headers['content-type'], | ||
response.body | ||
); | ||
this.repr = new Representation( | ||
response.headers['content-type'], | ||
response.body | ||
); | ||
}.bind(this)); | ||
@@ -107,0 +108,0 @@ |
{ | ||
"name": "restl", | ||
"version": "0.0.3", | ||
"description": "Generic hypermedia client.", | ||
"version": "0.0.4", | ||
"description": "Opiniated HAL client.", | ||
"main": "lib/index.js", | ||
@@ -31,3 +31,9 @@ "scripts": { | ||
"request-promise-any": "^1.0.3" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^3.15.0" | ||
}, | ||
"scripts" : { | ||
"test" : "eslint lib/" | ||
} | ||
} |
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
19306
14
338
1