Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
ava-types
Advanced tools
Readme
AvaTax v2 SDK for languages using node.js
Install the package with:
# using npm
npm install avatax
# using yarn
yarn add avatax
// es5 import
var Avatax = require('avatax');
// es6/7 import
// import Avatax from 'avatax';
// resolve configuration and credentials
const config = {
appName: 'your-app',
appVersion: '1.0',
environment: 'sandbox',
machineName: 'your-machine-name'
timeout: 5000 // optional, default 20 min
};
const creds = {
username: '<your-username>',
password: '<your-password>'
};
var client = new Avatax(config).withSecurity(creds);
const taxDocument = {
type: 'SalesInvoice',
companyCode: 'abc123',
date: '2017-04-12',
customerCode: 'ABC',
purchaseOrderNo: '2017-04-12-001',
addresses: {
SingleLocation: {
line1: '123 Main Street',
city: 'Irvine',
region: 'CA',
country: 'US',
postalCode: '92615'
}
},
lines: [
{
number: '1',
quantity: 1,
amount: 100,
taxCode: 'PS081282',
itemCode: 'Y0001',
description: 'Yarn'
}
],
commit: true,
currencyCode: 'USD',
description: 'Yarn'
}
return client.createTransaction({ model: taxDocument })
.then(result => {
// response tax document
console.log(result);
});
const address = {
city: 'irvine',
postalCode: '92615',
region: 'ca',
country: 'us'
};
return client.resolveAddress(address)
.then(result => {
// address validation result
console.log(result);
});
In the JS-SDK 21.2.1 release, the SDK can now return big integers from API responses. Big integers in JavaScript are displayed in responses by appending an 'n' to the end of an integer literal. For example, 618368842515476464 -> 618368842515476464n. Numbers are presented as before. For example, 8456123 -> 8456123. For more information, refer to the following Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
Running integration tests will hit the deployed lower environment
Test credentials are resolved in the following order:
The following environment variables will get loaded as test credentials
SANDBOX_USERNAME="your-username"
SANDBOX_PASSWORD="your-password"
You can also add a local credentials file to the the path "<project_root>/local_creds.json". This file will be gitignored
{
"username": "your-username",
"password": "your-password"
}
The mocked values are used for unit tests via 'nock'.
The test credentials helper can be found here https://github.com/avadev/AvaTax-REST-V2-JS-SDK/blob/master/test/helpers/load_creds.js
# assuming a tag of v17.5.2 and a remote of 'upstream'
git push upstream v17.5.2
FAQs
AvaTax v2 SDK for languages using JavaScript
We found that ava-types demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.