
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
! Under construction !
Jstor is an extremely simple ODM (Object Document Mapping), mainly focussed on JSON storage...
npm install jstor
Jstor can be either used in combination with
npm i jstor jstor-mongodb
npm i jstor jstor-mongodb
npm i jstor jstor-dynamodb
npm i jstor jstor-redis
npm i jstor jstor-s3
import Store from "jstor";
const store = new Store({
strategy: File/Memory/MongoDb/DynamoDb/Redis/S3(strategyOptions),
cacheOptions: {
keys: {
maxAge: seconds how long the keys (index) can get kept in memory
},
files: {
maxAge: seconds how long the documents themselves can remain in memory
}
},
failOptions: {
get: 'silent' || 'warning' || 'error',
set: 'silent' || 'warning' || 'error',
remove: 'silent' || 'warning' || 'error',
keys: 'silent' || 'warning' || 'error',
find: 'silent' || 'warning' || 'error',
...
always: 'silent' || 'warning' || 'error'
}
})
import Store, {Memory} from "jstor";
const store = new Store({
strategy: Memory()
})
import Store, {File} from "jstor";
const store = new Store({
strategy: File({
directory: './mystoragedir'
})
})
import Store from "jstor";
import MongoDb from "jstor-mongodb";
const store = new Store({
strategy: MongoDb({
uri: 'mongodb://127.0.0.1:27017',
dbName: 'jstorTestDb',
collection: 'jstorTestCollection',
maxBatchSize: 20 //whenever elements are batch fetched, take max 2 only per batch (default is 50)
})
})
import Store from "jstor";
import Redis from "jstor-redis";
const store = new Store({
strategy: Redis({
url: 'redis://127.0.0.1:6379',
keyPrefix: 'jstor' (only take keys into account with this prefix)
})
})
import Store from "jstor";
import S3 from "jstor-s3";
const store = new Store({
strategy: S3({
bucket: 'jstor-s3-sample',
region: 'eu-west-1',
credentials: {
accessKeyId: process.env.ACCESS_KEY,
secretAccessKey: process.env.ACCESS_KEY_SECRET
},
keyPrefix: 'jstor/'
})
})
import Store from "jstor";
import DynamoDb from "jstor-dynamodb";
const store = new DynamoDb({
strategy: S3({
table: 'jstor-dynamodb-test',
region: 'eu-west-1',
credentials: {
accessKeyId: process.env.ACCESS_KEY,
secretAccessKey: process.env.ACCESS_KEY_SECRET
}
})
})
const jsonDoc = await store.get(key)
const jsonDoc = await store.get(key);
await jsonDoc.save();
//or
await store.save(key, jsonValue);
const jsonDoc = await store.get(key);
await jsonDoc.remove();
//or
await store.remove(key);
const keys = await store.keys();
const docs = await store.all(startIndex, numberOfDocuments, booleanReverse);
const docs = await store.batch([keys]);
sourceStore.migrateTo(targetStore)
const doc = await sourceStore.get(key);
await doc.migrateTo(targetStore);
const docs = await store.find(mongoDbSearchDoc);
const doc = await store.findOne(mongoDbSearchDoc);
const doc = await store.get(key);
doc.set('address.street', 'Oudstrijdersstraat');
//doc.set(xpath, value)
doc.get('address.street');
//doc.get(key)
//returns 'Oudstrijdersstraat'
doc.json()
//returns the full json structure of the page
doc.json({foo: 'bar'})
//sets the full json document into the page
doc.json(`{"foo":"bar"}`)
//parses the string value to JSON
await doc.save();
//write changes to the storage system
FAQs
jstor nodejs
The npm package jstor receives a total of 4 weekly downloads. As such, jstor popularity was classified as not popular.
We found that jstor 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
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.