common-types
Advanced tools
Comparing version 1.23.3 to 1.23.5
@@ -8,6 +8,2 @@ export declare type sql = string; | ||
/** | ||
* A type guard to check that a string is of the type `TypeSubtype` | ||
*/ | ||
export declare function isTypeSubtype(str: string): str is TypeSubtype; | ||
/** | ||
* Stages of development. | ||
@@ -14,0 +10,0 @@ * |
@@ -18,2 +18,3 @@ export * from "./async"; | ||
export * from "./string-modifiers"; | ||
export * from "./type-guards"; | ||
export * from "./aliases/index"; | ||
@@ -20,0 +21,0 @@ export * from "./aws/index"; |
@@ -472,8 +472,17 @@ 'use strict'; | ||
/** | ||
* A type guard to check that a string is of the type `TypeSubtype` | ||
* A _type guard_ designed to test whether an input is of type `TypeSubtype` | ||
*/ | ||
function isTypeSubtype(str) { | ||
const parts = str.split("/"); | ||
return parts.length === 2; | ||
function isTypeSubtype(input) { | ||
return typeof input === "string" && input.split("/").length === 2; | ||
} | ||
/** | ||
* A type guard that checks whether an input is an "object" but also | ||
* _not_ `null`. | ||
* | ||
* This is useful test in its own right but can also be an important | ||
* building block for other type guards. | ||
*/ | ||
function isNonNullObject(input) { | ||
return typeof input === "object" && input !== null; | ||
} | ||
@@ -606,2 +615,3 @@ const AWS_REGIONS = [ | ||
exports.isLambdaProxyRequest = isLambdaProxyRequest; | ||
exports.isNonNullObject = isNonNullObject; | ||
exports.isProxyRequestContextV2 = isProxyRequestContextV2; | ||
@@ -608,0 +618,0 @@ exports.isServerlessFunctionHandler = isServerlessFunctionHandler; |
@@ -87,2 +87,6 @@ import { url } from "./aliases"; | ||
cpu?: string[]; | ||
/** | ||
* **eslint** lets you configure settings in the package.json | ||
*/ | ||
eslintConfig?: IDictionary; | ||
} |
@@ -8,6 +8,2 @@ export declare type sql = string; | ||
/** | ||
* A type guard to check that a string is of the type `TypeSubtype` | ||
*/ | ||
export declare function isTypeSubtype(str: string): str is TypeSubtype; | ||
/** | ||
* Stages of development. | ||
@@ -14,0 +10,0 @@ * |
@@ -18,2 +18,3 @@ export * from "./async"; | ||
export * from "./string-modifiers"; | ||
export * from "./type-guards"; | ||
export * from "./aliases/index"; | ||
@@ -20,0 +21,0 @@ export * from "./aws/index"; |
@@ -468,8 +468,17 @@ /** | ||
/** | ||
* A type guard to check that a string is of the type `TypeSubtype` | ||
* A _type guard_ designed to test whether an input is of type `TypeSubtype` | ||
*/ | ||
function isTypeSubtype(str) { | ||
const parts = str.split("/"); | ||
return parts.length === 2; | ||
function isTypeSubtype(input) { | ||
return typeof input === "string" && input.split("/").length === 2; | ||
} | ||
/** | ||
* A type guard that checks whether an input is an "object" but also | ||
* _not_ `null`. | ||
* | ||
* This is useful test in its own right but can also be an important | ||
* building block for other type guards. | ||
*/ | ||
function isNonNullObject(input) { | ||
return typeof input === "object" && input !== null; | ||
} | ||
@@ -586,3 +595,3 @@ const AWS_REGIONS = [ | ||
export { AWS_REGIONS, AwsRegionName, HttpStatusCodes, LambdaEventParser, StepFunctionMissingDataTreatment, createBindDeploymentConfig, getBodyFromPossibleLambdaProxyRequest, isArn, isArnPartition, isArnResource, isArnService, isAwsAccountId, isAwsRegion, isAwsStage, isBearerToken, isEventBridgeArn, isLambdaArn, isLambdaFunctionArn, isLambdaProxyRequest, 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, isLambdaArn, isLambdaFunctionArn, isLambdaProxyRequest, isNonNullObject, isProxyRequestContextV2, isServerlessFunctionHandler, isServerlessFunctionImage, isStepFunctionArn, isTypeSubtype, parseStack, wait }; | ||
//# sourceMappingURL=index.js.map |
@@ -87,2 +87,6 @@ import { url } from "./aliases"; | ||
cpu?: string[]; | ||
/** | ||
* **eslint** lets you configure settings in the package.json | ||
*/ | ||
eslintConfig?: IDictionary; | ||
} |
{ | ||
"name": "common-types", | ||
"version": "1.23.3", | ||
"version": "1.23.5", | ||
"description": "Common Types for Typescript", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/lifegadget/common-types", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
361120
116
8540