
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Useful patterns with Promise functions
$ npm install promiseful --save
To use in the browser, download the library from dist folder.
promiseful uses native ES2015 Promise
.
To use non-native, 3rd-party Promise
libraries, like bluebird or Promise polyfill, call promiseful.promise()
with the Promise
object, before using the API.
e.g.:
var Promise = require('bluebird');
// var Promise = require('es6-promise');
// var Promise = require('pinkie-promise');
var promiseful = require('promiseful');
promiseful.promise(Promise);
See example
promiseful uses native ES2015 Promise
.
To use non-native, 3rd-party Promise
libraries, like bluebird or Promise polyfill, include the library, before including promiseful.
e.g.:
<script src="https://cdn.jsdelivr.net/bluebird/latest/bluebird.min.js"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-promise/4.1.0/es6-promise.min.js"></script> -->
<script src="promiseful.js"></script>
See example
A promiseful function is a function that returns a Promise
.
e.g.:
function readPasswd() {
return new Promise((resolve, reject) => {
fs.readFile('/etc/passwd', (err, data) => {
if (err) {
reject(err);
} else {
resolve(data);
}
});
});
}
The API works with promiseful functions. Do not pass Promise objects.
Methods follow pattern, similar to the excellent caolan/async library.
FAQs
Useful patterns with Promise functions
We found that promiseful 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.