
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-pouchdb
Advanced tools
Hacky and mostly untested way to run pouchdb in react-native! I haven't encountered any glaring problems during development, but would not use this in a space shuttle app.
First, install react-native-sqlite-storage.
Then, install react-native-pouchdb.
npm install --save react-native-pouchdb
Then, use it with the websql adapter.
var db = new PouchDB('test', {
adapter: 'websql'
});
Now you have all the normal pouchdb goodness!
var db = new PouchDB('test', {
adapter: 'websql'
});
var remote = 'https://my.remote.couch'
var remoteDB = new PouchDB(remote)
var sync = db.sync(remoteDB, {
live: true,
retry: true
}).on('change', function(change) {
console.log(change, 'change!')
}).on('error', function(error) {
console.log(error, 'error!')
})
db.info().then(console.log.bind(console));
function showTodos() {
db.allDocs({include_docs: true, descending: true}, function(err, doc) {
console.log(doc.rows, doc.rows.length, 'show docs')
});
}
function addTodo(text) {
var todo = {
_id: new Date().toISOString(),
title: text,
completed: false
};
db.put(todo, function callback(err, result) {
if (!err) {
console.log('Successfully posted a todo!', result);
showTodos()
}
else {
console.log(err, 'err')
}
});
}
addTodo("testing todo")
db.changes({
since: 'now'
}).on('change', function (change) {
console.log('thats a change')
}).on('error', function (err) {
console.log('change error?')
});
FAQs
Run pouchdb in React Native!
The npm package react-native-pouchdb receives a total of 5 weekly downloads. As such, react-native-pouchdb popularity was classified as not popular.
We found that react-native-pouchdb 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.