Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
marsdb-angular
Advanced tools
MarsDB-Angular is an AngularJS 1.x binding for MarsDB. It makes easy to use MarsDB in an angular application by automatically wrap all returned promises with $q
and destroy observers on $scope's $destroy
event.
Include marsdb.angular.js
after marsdb.min.js
and angular.js
in your <head>
. Also don't forget to include marsdb.polyfills.js
. Then add a MarsDB
dependency in your module. That's it. Now you can use $collection
factory. For example:
angular.module(‘app’, [‘MarsDB’])
.controller(function($scope, $collection) {
// Each call for a `$collection(...)` automatically
// creates new collection if it is not exists
const posts = $collection(‘posts’);
// All methods in $collection returns a $q promise
// So you don’t need to manually call $digest
posts.find({authorId: 123}).observe((docs) => {
$scope.posts = docs;
}, $scope).then(() => {
$scope.loaded = true;
});
// $scope at last argument needed for auto-binding
// to a “$destroy” event of the scope for stop
// observing changes. You can call it manually and
// don’t pass last argument.
});
All included storage implementations is available in a Mars.Storages
global variable. You can set different default storage by $collectionProvider.defaultStorageManager(Mars.Storages.LocalForage)
.
You also can use MarsDB within browserify environment. Just require(‘marsdb-angular’)
and MarsDB module will be added to the angular. Angular must be defined in a window
or must be available as a module require(‘angular’)
.
I’m waiting for your pull requests and issues.
Don’t forget to execute gulp lint
before requesting. Accepted only requests without errors.
See License
FAQs
MarsDB-Angular is an AngularJS 1.x binding for MarsDB
The npm package marsdb-angular receives a total of 35 weekly downloads. As such, marsdb-angular popularity was classified as not popular.
We found that marsdb-angular 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.