Huge News!Announcing our $40M Series B led by Abstract Ventures.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.23.3 to 1.23.5

dist/cjs/type-guards.d.ts

4

dist/cjs/aliases/stringAliases.d.ts

@@ -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

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