
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.
angular-localforage-migrations
Advanced tools
Migrate localForage data in an Angular app
angular-localforage-migrations
module// commonjs users:
var app = angular.module('my-app', [require('angular-localforage-migrations')])
// everyone else:
var app = angular.module('my-app', ['angular-localforage-migrations'])
migrationsProvider
in a config blockapp.config(function(migrationsProvider) {
migrationsProvider.add({
id: 1,
migrate: ['dep', function(dep) {
// migrate data here and return promise
}]
})
})
Has required properties:
migrations.migrate()
app.factory('my-data-service', function(migrations, $localForage) {
return {
getSomeData: function() {
return migrations.migrate().then(function() {
return $localForage.getItem('some-data')
})
}
}
})
Returns promise fulfilled when all pending migrations have been run.
git clone https://github.com/psalaets/angular-localforage-migrations.git
cd angular-localforage-migrations/example
bower install
If you are using this module in multiple apps on the same domain, you should supply a namespace for angular-localforage-migrations's internal data store.
That can be done on the migrationsProvider:
app.config(function(migrationsProvider) {
migrationsProvider.setInternalNamespace('unique-string-for-app')
})
npm install angular-localforage-migrations --save
bower install angular-localforage-migrations --save
This module can be used with browserify or by exposing global variables.
It assumes these modules are already loaded or can be required:
See of example/index.html for example of load order.
MIT
[3.1.0] - 2015-03-28
require('angular-localforage-migrations')
now returns the Angular module name so commonjs users can doangular.module('app', [require('angular-localforage-migrations')])
FAQs
Migrate localForage data in an Angular app
The npm package angular-localforage-migrations receives a total of 1 weekly downloads. As such, angular-localforage-migrations popularity was classified as not popular.
We found that angular-localforage-migrations 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.