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

common-types

Package Overview
Dependencies
Maintainers
1
Versions
308
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-types - npm Package Compare versions

Comparing version 1.24.5 to 1.24.6

14

dist/cjs/aliases/datetime.d.ts

@@ -76,2 +76,16 @@ import { NumericCharacter } from "./stringAliases";

/**
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant
* _date_ and _time_ string of the form: _YYYY-MM-DD**T**HH:mm:ss.sssZ_.
* Apparently another format for year which is 6 characters long is also
* allowed (this must be preceeded by a + or - character).
*
* Note: this is the format which you will get from JS with `.toISOString()`
*/
export declare type Iso8601DateTime = `${string}${number}-${number}-${number}T${number}:${number}:${number}.${number}Z`;
/**
* Type guard to determine if a given timestamp is a valid ISO 8601
* datetime stamp.
*/
export declare function isIso8601DateTime(timestamp: unknown): timestamp is Iso8601DateTime;
/**
* a string of the format: "YYYY-MM-DD"

@@ -78,0 +92,0 @@ */

@@ -493,2 +493,12 @@ 'use strict';

/**
* Type guard to determine if a given timestamp is a valid ISO 8601
* datetime stamp.
*/
function isIso8601DateTime(timestamp) {
return (typeof timestamp === "string" &&
(timestamp.length === 24 || timestamp.length === 27) &&
/(\d{4}|[+-]\d{6})-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z/.test(timestamp));
}
const AWS_REGIONS = [

@@ -617,2 +627,3 @@ "us-east-1",

exports.isEventBridgeArn = isEventBridgeArn;
exports.isIso8601DateTime = isIso8601DateTime;
exports.isLambdaArn = isLambdaArn;

@@ -619,0 +630,0 @@ exports.isLambdaFunctionArn = isLambdaFunctionArn;

@@ -76,2 +76,16 @@ import { NumericCharacter } from "./stringAliases";

/**
* An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant
* _date_ and _time_ string of the form: _YYYY-MM-DD**T**HH:mm:ss.sssZ_.
* Apparently another format for year which is 6 characters long is also
* allowed (this must be preceeded by a + or - character).
*
* Note: this is the format which you will get from JS with `.toISOString()`
*/
export declare type Iso8601DateTime = `${string}${number}-${number}-${number}T${number}:${number}:${number}.${number}Z`;
/**
* Type guard to determine if a given timestamp is a valid ISO 8601
* datetime stamp.
*/
export declare function isIso8601DateTime(timestamp: unknown): timestamp is Iso8601DateTime;
/**
* a string of the format: "YYYY-MM-DD"

@@ -78,0 +92,0 @@ */

12

dist/es/index.js

@@ -489,2 +489,12 @@ /**

/**
* Type guard to determine if a given timestamp is a valid ISO 8601
* datetime stamp.
*/
function isIso8601DateTime(timestamp) {
return (typeof timestamp === "string" &&
(timestamp.length === 24 || timestamp.length === 27) &&
/(\d{4}|[+-]\d{6})-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z/.test(timestamp));
}
const AWS_REGIONS = [

@@ -600,3 +610,3 @@ "us-east-1",

export { AWS_REGIONS, AwsRegionName, HttpStatusCodes, LambdaEventParser, StepFunctionMissingDataTreatment, createBindDeploymentConfig, getBodyFromPossibleLambdaProxyRequest, isArn, isArnPartition, isArnResource, isArnService, isAwsAccountId, isAwsRegion, isAwsStage, isBearerToken, isEventBridgeArn, isLambdaArn, isLambdaFunctionArn, isLambdaProxyRequest, isNonNullObject, isNpmInfoRepository, isProxyRequestContextV2, isServerlessFunctionHandler, isServerlessFunctionImage, isStepFunctionArn, isTypeSubtype, parseStack, wait };
export { AWS_REGIONS, AwsRegionName, HttpStatusCodes, LambdaEventParser, StepFunctionMissingDataTreatment, createBindDeploymentConfig, getBodyFromPossibleLambdaProxyRequest, isArn, isArnPartition, isArnResource, isArnService, isAwsAccountId, isAwsRegion, isAwsStage, isBearerToken, isEventBridgeArn, isIso8601DateTime, isLambdaArn, isLambdaFunctionArn, isLambdaProxyRequest, isNonNullObject, isNpmInfoRepository, isProxyRequestContextV2, isServerlessFunctionHandler, isServerlessFunctionImage, isStepFunctionArn, isTypeSubtype, parseStack, wait };
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "common-types",
"version": "1.24.5",
"version": "1.24.6",
"description": "Common Types for Typescript",

@@ -34,3 +34,3 @@ "repository": "https://github.com/lifegadget/common-types",

"chai": "^4.2.0",
"do-devops": "^0.6.1",
"do-devops": "^0.9.0",
"json-schema": "^0.3.0",

@@ -37,0 +37,0 @@ "mocha": "^8.2.1",

Sorry, the diff of this file is not supported yet

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