
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
pouchdb-abstract-mapreduce
Advanced tools
PouchDB's secondary index API as an abstract module
npm install --save-exact pouchdb-abstract-mapreduce
var createAbstractMapreduce = require('pouchdb-abstract-mapreduce');
var abstract = createAbstractMapreduce(
localDoc,
mapper,
reducer,
ddocValidator);
The createAbstractMapreduce
function returns an "abstract" mapreduce object of the form:
{
query: queryFun,
viewCleanup: viewCleanupFun
}
Arguments are:
localDoc: string
This is for the local doc that gets saved in order to track the
"dependent" DBs and clean them up for viewCleanup. It should be
unique, so that indexer plugins don't collide with each other.
mapper: function (mapFunDef, emit)
Returns a map function based on the mapFunDef, which in the case of
normal map/reduce is just the de-stringified function, but may be
something else, such as an object in the case of pouchdb-find.
reducer: function (reduceFunDef)
Ditto, but for reducing. Modules don't have to support reducing
(e.g. pouchdb-find).
ddocValidator: function (ddoc, viewName)
Throws an error if the ddoc or viewName is not valid.
This could be a way to communicate to the user that the configuration for the
indexer is invalid.
For full API documentation and guides on PouchDB, see PouchDB.com. For details on PouchDB sub-packages, see the Custom Builds documentation.
This package is conceptually an internal API used by PouchDB or its plugins. It does not follow semantic versioning (semver), and rather its version is pegged to PouchDB's. Use exact versions when installing, e.g. with --save-exact
.
PouchDB and its sub-packages are distributed as a monorepo.
For a full list of packages, see the GitHub source.
FAQs
PouchDB's secondary index API as an abstract module
The npm package pouchdb-abstract-mapreduce receives a total of 36,034 weekly downloads. As such, pouchdb-abstract-mapreduce popularity was classified as popular.
We found that pouchdb-abstract-mapreduce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.