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

be-hippo

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

be-hippo - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

bower.json
{
"name": "hippo",
"version": "0.2.0",
"version": "0.3.1",
"homepage": "https://github.com/Attamusc/hippo",

@@ -5,0 +5,0 @@ "authors": [

@@ -31,19 +31,11 @@ /**

if (!this._head) {
return this._getRootDescriptor()
.then(function(rootResource) {
this._head = rootResource;
return this._getRootDescriptor()
.then(this._doWalk.bind(this, args));
};
if (!args.length) {
return this._head;
}
return this._doWalk(args);
}.bind(this));
}
return this._doWalk(args);
Client.prototype.clearDescriptorCache = function() {
delete this._descriptorCache;
};
Client.prototype._doWalk = function(shortNames) {
Client.prototype._doWalk = function(shortNames, head) {
var self = this;

@@ -61,3 +53,3 @@ var walkerPath = toWalkerPath(shortNames);

});
}, Promise.resolve(this._head))
}, Promise.resolve(head))
.then(function(resource) {

@@ -80,2 +72,6 @@ var uri = resource.getConnection('self');

Client.prototype._getDescriptor = function(uri) {
if ((this._descriptorCache = this._descriptorCache || {})[uri]) {
return this._descriptorCache[uri];
}
var options = {

@@ -87,6 +83,11 @@ url: uri,

return xhr(options)
this._descriptorCache[uri] = xhr(options)
.then(function(descriptor) {
return new Resource(descriptor);
});
this._descriptorCache[uri].catch(function() {
delete this._descriptorCache[uri];
});
return this._descriptorCache[uri];
};

@@ -93,0 +94,0 @@

{
"name": "be-hippo",
"version": "0.3.0",
"version": "0.3.1",
"description": "A PropositionH hypermedia consumer",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -35,2 +35,6 @@ define(['chai-as-promised', 'lib/client', 'lib/resource'], function(chaiAsPromised, Client, Resource) {

afterEach(function() {
client.clearDescriptorCache();
});
describe('that does not conform to the hypermedia format', function() {

@@ -37,0 +41,0 @@ var response = [200, { "Content-Type": "application/json" }, JSON.stringify({})];

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