
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
webpack-localforage
Advanced tools
Webpack friendly https://github.com/mozilla/localForage (Offline storage, improved.)
http://mozilla.github.io/localForage/
bower install webpack-localforage
or npm npm install webpack-localforage
npm install webpack
with following loaders
npm install bundle-loader
npm install imports-loader
npm install exports-loader
bower install es6-promise
var path = require('path');
/* Adjust the bower path according to your project structure */
var bowerComponentsPath = path.join(__dirname, '/bower_components');
var config = {
module: {
{
test: /[\/]promise\.js$/,
loaders: ['exports?Promise']
},
{
test: /[\/](localforage|indexeddb|localstorage|websql)\.js$/,
loaders: ['imports?this=>window']
}
},
resolve: {
alias: {
localforage: path.join(bowerComponentsPath, 'webpack-localForage/src/localforage.js'),
// A polyfill for ES6-style Promises
promise: path.join(bowerComponentsPath, 'es6-promise/promise.js'),
}
}
};
module.exports = config;
If you are targeting browsers with no promise support (http://caniuse.com/#feat=promises), lazy load polyfill.
var es6PromiseSupport =
'Promise' in window &&
/*
* Some of these methods are missing from
* Firefox/Chrome experimental implementations
*/
'resolve' in window.Promise &&
'reject' in window.Promise &&
'all' in window.Promise &&
'race' in window.Promise &&
(function () {
/*
* Older version of the spec had a resolver object
* as the arg rather than a function
*/
var resolve;
new window.Promise(function (r) {
resolve = r;
});
return (typeof resolve === 'function');
}());
if (!es6PromiseSupport) {
var load = require('bundle?lazy!promise');
load(function (promise) {
callback();
});
} else {
callback();
}
var callback = function(){
require('localforage');
}
FAQs
Webpack friendly mozilla/localForage.
We found that webpack-localforage 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.