Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

restl

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restl - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

.eslintrc.js

7

changelog.md
ChangeLog
=========
0.0.4 (2017-02-06)
-----------------
* Bugfixes.
* Linting with eslint.
0.0.3 (2017-02-06)

@@ -5,0 +12,0 @@ ------------------

12

lib/client.js
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/"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc