New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@commont/react

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commont/react - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

24

dist/index.esm.js

@@ -38,12 +38,8 @@ import { useState, useEffect, useRef } from 'react';

})).then(function (response) {
if (!response.ok) {
throw new Error(response.statusText);
}
return Promise.resolve(response.json()).then(function (responseJson) {
if (response.ok && responseJson) {
return responseJson;
if ('error' in responseJson) {
throw new Error(responseJson.error);
}
throw new Error('Empty API response');
return responseJson;
});

@@ -65,12 +61,8 @@ });

})).then(function (response) {
if (!response.ok) {
throw new Error(response.statusText);
}
return Promise.resolve(response.json()).then(function (responseJson) {
if (response.ok && responseJson) {
return responseJson;
if ('error' in responseJson) {
throw new Error(responseJson.error);
}
throw new Error('Empty API response');
return responseJson.comment;
});

@@ -173,5 +165,3 @@ });

author: author
}).then(function (res) {
var remoteComment = res.comment;
}).then(function (remoteComment) {
if (isMounted) {

@@ -178,0 +168,0 @@ setComments(function (prev) {

@@ -38,12 +38,8 @@ var react = require('react');

})).then(function (response) {
if (!response.ok) {
throw new Error(response.statusText);
}
return Promise.resolve(response.json()).then(function (responseJson) {
if (response.ok && responseJson) {
return responseJson;
if ('error' in responseJson) {
throw new Error(responseJson.error);
}
throw new Error('Empty API response');
return responseJson;
});

@@ -65,12 +61,8 @@ });

})).then(function (response) {
if (!response.ok) {
throw new Error(response.statusText);
}
return Promise.resolve(response.json()).then(function (responseJson) {
if (response.ok && responseJson) {
return responseJson;
if ('error' in responseJson) {
throw new Error(responseJson.error);
}
throw new Error('Empty API response');
return responseJson.comment;
});

@@ -173,5 +165,3 @@ });

author: author
}).then(function (res) {
var remoteComment = res.comment;
}).then(function (remoteComment) {
if (isMounted) {

@@ -178,0 +168,0 @@ setComments(function (prev) {

@@ -21,14 +21,9 @@ import { useState, useEffect, useRef } from 'react';

});
if (!response.ok) {
throw new Error(response.statusText);
}
const responseJson = await response.json();
if (response.ok && responseJson) {
return responseJson;
if ('error' in responseJson) {
throw new Error(responseJson.error);
}
throw new Error('Empty API response');
return responseJson;
};

@@ -44,14 +39,9 @@

});
if (!response.ok) {
throw new Error(response.statusText);
}
const responseJson = await response.json();
if (response.ok && responseJson) {
return responseJson;
if ('error' in responseJson) {
throw new Error(responseJson.error);
}
throw new Error('Empty API response');
return responseJson.comment;
};

@@ -136,5 +126,3 @@ /**

author
}).then(res => {
const remoteComment = res.comment;
}).then(remoteComment => {
if (isMounted) {

@@ -141,0 +129,0 @@ setComments(prev => prev.map(x => x === newComment ? { ...remoteComment,

@@ -41,12 +41,8 @@ (function (global, factory) {

})).then(function (response) {
if (!response.ok) {
throw new Error(response.statusText);
}
return Promise.resolve(response.json()).then(function (responseJson) {
if (response.ok && responseJson) {
return responseJson;
if ('error' in responseJson) {
throw new Error(responseJson.error);
}
throw new Error('Empty API response');
return responseJson;
});

@@ -68,12 +64,8 @@ });

})).then(function (response) {
if (!response.ok) {
throw new Error(response.statusText);
}
return Promise.resolve(response.json()).then(function (responseJson) {
if (response.ok && responseJson) {
return responseJson;
if ('error' in responseJson) {
throw new Error(responseJson.error);
}
throw new Error('Empty API response');
return responseJson.comment;
});

@@ -176,5 +168,3 @@ });

author: author
}).then(function (res) {
var remoteComment = res.comment;
}).then(function (remoteComment) {
if (isMounted) {

@@ -181,0 +171,0 @@ setComments(function (prev) {

@@ -5,3 +5,3 @@ {

"description": "Effortlessly add a comment section to your website, and start the discussion on your content.",
"version": "0.0.3",
"version": "0.0.4",
"license": "MIT",

@@ -8,0 +8,0 @@ "author": "Aleksandra Sikora (https://github.com/beerose)",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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