Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A JavaScript AJAX library with proxies
go.get('people').then(result => {
// handle the result
}).catch(error => {
// handle the error
})
go.configure({
onerror : handleError,
onprogress : handleProgress,
timeout : 10000,
urlPrefix : '/rs'
});
go.get('customers', {
block : true,
cache : false,
content : 'json',
headers : {
'Accept-Encoding' : 'utf-8'
},
message : 'Getting customers...',
silent : true,
type : 'json'
})
Gopher includes the ability to create proxies (much like RESTEasy)
let customerProxy = go.createProxy({
path: '/customers',
endpoints: {
getAllCustomers: {},
getCustomerWithId: {
path: '/{id}',
options: {
cache: true
}
},
saveCustomer: {
method: 'post'
}
}
});
// call the proxy method
customerProxy.getCustomerWithId({ id : 102 }).then (result => { /* ... */ });
// you can also call the method with just arguments
// they will be added sequentially, as specified in the path
customerProxy.getCustomerWithId(102).then(result => { /* ... */ });
Data mappers provide serializers and deserializers for AJAX data. Mappers comprise of two
methods: serialize
and deserialize
. Included are mappers for JSON, plain text, and XML.
let MyJSONMapper = {
serialize: function(data) {
return JSON.stringify(data);
},
deserialize: function(data) {
return (data) ? JSON.parse(data) : null;
}
};
// add the mapper to the registry
go.mappers.add('json', MyJSONMapper, [ 'application/json', 'text/json' ]);
Performs a GET request on the specified URL
Performs a POST request
Performs a PUT request
Performs a DELETE request
Performs a HEAD request
Fetches a resource relative to the current location
FAQs
A powerful, flexible JavaScript AJAX library
We found that gopher-js 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.