![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
kevin-johnson
Advanced tools
PostgresSQL backed key/val store with support for JSON values and key expiration
Essentially hstore with JSON val and key expiration support
npm install kevin-johnson
const appStore = require('kevin-johnson');
const opts = {
appName: 'myApp',
dbUrl: process.env.DATABASE_URL
};
const key = 'key';
const val = 'val';
appStore(opts).then((ctx) => {
return store.set(key, val);
})
.then((obj) => {
const keys = Object.keys(obj);
console.log(keys[ 0 ]); // 'key'
console.log(obj[ key ]); // 'val'
});
Batch setting/getting
const items = {
foo: 'bar',
ping: {
beep: [ 'boop', 'bop' ]
}
};
store.setAll(items)
.then(() => {
return store.getAll(Object.keys(items));
})
.then(function(map) {
// map === items
});
Deletion
store.set('delMe', 'foo')
.then(() => {
return store.get('delMe');
}).then((obj) => {
console.log(obj); // { delMe: 'foo' }
return store.del('delMe');
}).then(() => {
return store.get('delMe');
}).then(function(item) {
console.log(item); // undefined
});
Key Expiration
store.set('beep', 'boop', 2000)
.then(() => {
setTimeout(() => {
store.get('beep')
.then((item) => {
console.log(item); // undefined
});
}, 4000);
});
Create your test PostgresSQL database and user and create a test.env file for environment constiables
$ createuser myApp
$ createdb myApp
$ echo "DATABASE_URL=postgres://myApp:Ffoodk@localhost:5432/myApp" >> test/test.env
$ echo "NODE_ENV=test" >> test/test.env
$ echo "APP_NAME=appName" >> test/test.env
$ npm test
FAQs
PostgresSQL backed key/val store with support for JSON values and key expiration
The npm package kevin-johnson receives a total of 0 weekly downloads. As such, kevin-johnson popularity was classified as not popular.
We found that kevin-johnson 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.