Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// kitty.save().then((res) => console.log(typeof res)).catch((err) => console.error(err));
// kittyB.save().then((res) => console.log(typeof res)).catch((err) => console.error(err));
const sdk = dynamoose.aws.sdk; // require("aws-sdk");
sdk.config.update({
"accessKeyId": "AKID",
"secretAccessKey": "SECRET",
"region": "us-east-1"
});
const ddb = new dynamoose.aws.sdk.DynamoDB({"endpoint": "http://localhost:8000"});
dynamoose.aws.ddb.set(ddb);
dynamooseOld.setDDB(ddb);
const Cat = dynamooseOld.model("Cat200", {"id": Number, "name": String, "breed": String}, {"create": false});
const CatB = new dynamoose.model("Cat200", {"id": Number, "name": String, "breed": String}, {"create": false});
async function main() {
// const cat = new Cat({"id": 10, "other": "Test", "name": "test"});
// console.log(cat);
// const other = await cat.save();
// console.log(other);
// console.log(await Cat.get(10));
// for (let i = 0; i < 1000; i++) {
// const cat = new CatB({"id": i, "name": new Array(50000).fill("a").join("")});
// await cat.save();
// }