New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

oneday-core

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oneday-core - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

17

db.js

@@ -9,2 +9,4 @@ const aws = require('aws-sdk');

module.exports.queryDbElseThrow = queryDbElseThrow;
module.exports.put = put;
module.exports.transactionWrite = transactionWrite;

@@ -87,2 +89,17 @@ async function getFromDbElseThrow(params, filter) {

return result.Items;
}
async function put(params) {
await dynamoDb.put(params).promise();
console.log("Successfully posted to: " + params.TableName);
}
async function transactionWrite(params) {
await dynamoDb.transactWrite(params).promise();
console.log("Successfully committed transaction.");
}
async function update(params) {
await dynamoDb.update(params).promise();
console.log("Successfully updated attribute.");
}

4

index.js

@@ -22,2 +22,4 @@ 'use strict';

module.exports.queryDbElseThrow = db.queryDbElseThrow;
module.exports.put = db.put;
module.exports.transactionWrite = db.transactionWrite;

@@ -27,2 +29,4 @@ module.exports.hasProperties = util.hasProperties;

module.exports.isObject = util.isObject;
module.exports.get = util.get;
module.exports.isPresent = util.isPresent;

@@ -29,0 +33,0 @@ //ToDo: Add response code, global and lambda request tracking numbers

2

package.json
{
"name": "oneday-core",
"version": "1.0.13",
"version": "1.0.14",
"description": "Basic AWS util functions to ease development.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,2 +7,4 @@ module.exports.getDynamoDbArn = getDynamoDbArn;

module.exports.isObject = isObject;
module.exports.get = get;
module.exports.isPresent = isPresent;

@@ -66,2 +68,10 @@ function getDynamoDbArn(region, accountid, table) {

function get(param){
return param === undefined ? null : param;
}
function isPresent(param){
return param !== undefined;
}
function isArray(a) {

@@ -68,0 +78,0 @@ return (!!a) && (a.constructor === Array);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc