Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
chargehound
Advanced tools
Readme
npm install chargehound
Every resource is accessed via the chargehound
instance:
var chargehound = require('chargehound')('{ YOUR_API_KEY }');
Every resource method accepts an optional callback as the last argument:
chargehound.Disputes.submit('dp_123', {fields: {customer_name: 'Susie'}},
function (err, dispute) {
err; // null if no error occurred
dispute; // the submitted dispute object
}
);
Additionally, every resource method returns a promise, so you don't have to use the regular callback. E.g.
chargehound.Disputes.submit('dp_123', {fields: {customer_name: 'Susie'}})
.then(function (dispute) {
// Success
.catch(function (err) {
// Deal with an error
});
Responses from the API are automatically parsed from JSON and returned as JavaScript objects.
Responses also include the HTTP status code on the response
object as the status
field.
chargehound.Disputes.retrieve('dp_123').then(dispute => {
console.log(dispute.state)
// 'needs_response'
console.log(dispute.response.status)
// 200
});
To build and install from the latest source:
$ git clone git@github.com:chargehound/chargehound-node.git
$ npm install
The source code is written in ES6. For development you will need Node.js >= v8.
Run the tests using npm
:
$ npm test
To deploy a new version of the SDK, perform the following steps:
package.json
npm publish
FAQs
Automatically fight disputes
The npm package chargehound receives a total of 276 weekly downloads. As such, chargehound popularity was classified as not popular.
We found that chargehound demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.