Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dynamodb-raw

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dynamodb-raw - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

4

lib/schema.js

@@ -128,7 +128,7 @@ 'use strict';

if(self.createdAt !== false) {
valids[createdAtParamName] = Joi.date();
valids[createdAtParamName] = Joi.date().timestamp('unix');
}
if(self.updatedAt !== false) {
valids[updatedAtParamName] = Joi.date();
valids[updatedAtParamName] = Joi.date().timestamp('unix');
}

@@ -135,0 +135,0 @@

@@ -32,7 +32,8 @@ 'use strict';

date : function (value) {
if(_.isDate(value)) {
return value.toISOString();
} else {
return new Date(value).toISOString();
}
return parseInt(value) || 0
//if(_.isDate(value)) {
//return value.toISOString();
//} else {
//return new Date(value).toISOString();
//}
},

@@ -39,0 +40,0 @@

@@ -153,3 +153,4 @@ 'use strict';

if(self.schema.timestamps && self.schema.createdAt !== false && !_.has(data, paramName)) {
data[paramName] = new Date().toISOString();
//data[paramName] = new Date().toISOString();
data[paramName] = +(new Date) / 1000 >>> 0;
}

@@ -254,3 +255,4 @@

if(self.schema.timestamps && self.schema.updatedAt !== false && !_.has(item, paramName)) {
item[paramName] = new Date().toISOString();
// item[paramName] = new Date().toISOString();
item[paramName] = +(new Date) / 1000 >>> 0;
}

@@ -257,0 +259,0 @@

{
"name": "dynamodb-raw",
"version": "1.1.1",
"version": "1.1.2",
"contributors": [

@@ -5,0 +5,0 @@ "Ryan Fitzgerald <ryan@codebrewstudios.com>",

Following modification made on the original [dynamodb](https://github.com/yi/dynamodb) module
### Following modification made on the original [dynamodb](https://github.com/yi/dynamodb) module
* return raw data rather then instance of Item/Model, for the ease of local cache
* Return raw data rather then instance of Item/Model, for the ease of local cache
* Change value of `DATE` data type to [Unix Epoch Time](https://en.wikipedia.org/wiki/Unix_time)
* Change auto timestamps to [Unix Epoch Time](https://en.wikipedia.org/wiki/Unix_time)
---

@@ -8,0 +9,0 @@

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