
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
simple-dyno
Advanced tools
Easy to use, minimalistic wrapper for AWS DynamoDB
$ npm install simple-dyno
To create a new entry, and options can include {skipValidation: true}:
Model.create(attributes, options)
To get an entry or multiple entries:
Model.get(keyValues)
To update an entry, and options can include {skipValidation: true}:
Model.update(keyValues, attributes, options)
To delete an entry:
Model.destroy(keyValues)
To perform a scan operation (not recommended):
Model.find(attributes)
To query using a secondary index:
Model.query(indexName, attributes)
To serialize the response attributes:
Model.serialize(response, options)
To run a local DynamoDB (which runs on Java), by default runs in memory but you can also store on disk using {inMemory: false} as options:
SimpleDyno.local(options)
To set the config, which you can pass the following options {accessKeyId: '', secretAccessKey: '', region: ''}:
SimpleDyno.config(options)
// Import deps
import { Model } from 'simple-dyno';
import Joi from 'joi';
// Add your own methods
class UserModel extends Model {
myAwesomeMethod(obj) {
return obj.firstName+obj.lastName;
}
}
// Create model instance
var User = new UserModel({
table: 'users',
hashKey: 'email',
serializers: {
default: ['email'],
scary: ['access_token', 'password']
},
schema: {
email: Joi.string().email(),
access_token: Joi.string(),
password: {
format: Joi.string().regex(/[a-zA-Z0-9]{3,30}/),
encrypt: true
}
}
});
var userObj = yield User.create({email: 'test@simpledyno.com', access_token: 'aW12k3KDASsd012Ms1Mf29Mc7', password: '******'})
return User.serialize(userObj, {format: 'scary'});
// Import deps
import * as SimpleDyno from 'simple-dyno';
// Start a local DynamoDB
yield SimpleDyno.local();
// Create accociated tables for the following model(s)
SimpleDyno.load(User);
Please create a pull request, make sure to include and update the tests and that they're working. And don't forget to build the minified version (with babel) with make simple-dyno.js.
Use make test to do a test run using Mocha.
Copyright (c) 2016 Awkward.
Distributed under MIT license.
FAQs
Wrapper around AWS DynamoDB SDK to make things easier
The npm package simple-dyno receives a total of 0 weekly downloads. As such, simple-dyno popularity was classified as not popular.
We found that simple-dyno demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.