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

@aws-sdk/protocol-timestamp

Package Overview
Dependencies
Maintainers
5
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/protocol-timestamp - npm Package Compare versions

Comparing version 0.1.0-preview.2 to 0.1.0-preview.3

1

build/index.d.ts

@@ -5,1 +5,2 @@ export declare function iso8601(time: number | string | Date): string;

export declare function toDate(time: number | string | Date): Date;
export declare function formatTimestamp(time: number | string | Date, format: string): number | string;

@@ -20,2 +20,5 @@ "use strict";

if (typeof time === 'string') {
if (Number(time)) {
return new Date(Number(time) * 1000);
}
return new Date(time);

@@ -26,2 +29,15 @@ }

exports.toDate = toDate;
function formatTimestamp(time, format) {
switch (format) {
case 'iso8601':
return iso8601(time);
case 'rfc822':
return rfc822(time);
case 'unixTimestamp':
return epoch(time);
default:
throw new Error('Invalid TimestampFormat: ' + format);
}
}
exports.formatTimestamp = formatTimestamp;
//# sourceMappingURL=index.js.map

@@ -6,4 +6,15 @@ # Change Log

# [0.1.0-preview.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/protocol-timestamp@0.1.0-preview.2...@aws-sdk/protocol-timestamp@0.1.0-preview.3) (2019-04-19)
### Features
* timestamp serializing and de-serializing ([#216](https://github.com/aws/aws-sdk-js-v3/issues/216)) ([0556c99](https://github.com/aws/aws-sdk-js-v3/commit/0556c99))
# [0.1.0-preview.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/protocol-timestamp@0.1.0-preview.1...@aws-sdk/protocol-timestamp@0.1.0-preview.2) (2019-03-27)
**Note:** Version bump only for package @aws-sdk/protocol-timestamp

7

package.json
{
"name": "@aws-sdk/protocol-timestamp",
"version": "0.1.0-preview.2",
"version": "0.1.0-preview.3",
"description": "A marshaller and unmarshaller for timestamps used by the AWS SDKs",

@@ -18,3 +18,3 @@ "main": "./build/index.js",

"dependencies": {
"@aws-sdk/types": "^0.1.0-preview.2",
"@aws-sdk/types": "^0.1.0-preview.3",
"tslib": "^1.8.0"

@@ -27,4 +27,3 @@ },

},
"types": "./build/index.d.ts",
"gitHead": "3dd9e610b159cadf8db49740ee8b0732e0c966e2"
"types": "./build/index.d.ts"
}

Sorry, the diff of this file is not supported yet

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