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.5.0 to 1.5.1

19

lib/common-types.d.ts

@@ -33,19 +33,4 @@ /**

export declare type uri = string;
export declare enum STAGE {
prod = "prod",
stage = "stage",
test = "test",
dev = "dev",
production = "prod",
staging = "stage",
testing = "test",
development = "dev",
}
export declare enum FirebaseEvent {
value = "value",
child_added = "child_added",
child_moved = "child_moved",
child_removed = "child_removed",
child_changed = "child_changed",
}
export declare const STAGE_MAP: IDictionary<string>;
export declare function STAGE(stage: string): string;
export declare type AWSGatewayCallback<T = IAWSGatewayResponse> = (error: any, response: T) => void;

@@ -52,0 +37,0 @@ export interface IAWSGatewayResponse {

39

lib/common-types.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var STAGE;
(function (STAGE) {
STAGE["prod"] = "prod";
STAGE["stage"] = "stage";
STAGE["test"] = "test";
STAGE["dev"] = "dev";
STAGE["production"] = "prod";
STAGE["staging"] = "stage";
STAGE["testing"] = "test";
STAGE["development"] = "dev";
})(STAGE = exports.STAGE || (exports.STAGE = {}));
var FirebaseEvent;
(function (FirebaseEvent) {
FirebaseEvent["value"] = "value";
FirebaseEvent["child_added"] = "child_added";
FirebaseEvent["child_moved"] = "child_moved";
FirebaseEvent["child_removed"] = "child_removed";
FirebaseEvent["child_changed"] = "child_changed";
})(FirebaseEvent = exports.FirebaseEvent || (exports.FirebaseEvent = {}));
exports.STAGE_MAP = {
prod: "prod",
stage: "stage",
test: "test",
dev: "dev",
production: "prod",
staging: "stage",
testing: "test",
development: "dev"
};
function STAGE(stage) {
if (new Set(Object.keys(exports.STAGE_MAP)).has(stage)) {
return exports.STAGE_MAP[stage];
}
else {
console.warn(`An invalid stage was passed in: "${stage}"; will use "dev" as default`);
return "dev";
}
}
exports.STAGE = STAGE;
//# sourceMappingURL=common-types.js.map
{
"name": "common-types",
"version": "1.5.0",
"version": "1.5.1",
"description": "Common types not included in Typescript",

@@ -5,0 +5,0 @@ "main": "lib/common-types.js",

@@ -38,19 +38,22 @@ // import chalk from "chalk";

export enum STAGE {
prod = "prod",
stage = "stage",
test = "test",
dev = "dev",
production = prod,
staging = stage,
testing = test,
development = dev
}
export const STAGE_MAP: IDictionary<string> = {
prod: "prod",
stage: "stage",
test: "test",
dev: "dev",
production: "prod",
staging: "stage",
testing: "test",
development: "dev"
};
export enum FirebaseEvent {
value = "value",
child_added = "child_added",
child_moved = "child_moved",
child_removed = "child_removed",
child_changed = "child_changed"
export function STAGE(stage: string) {
if (new Set(Object.keys(STAGE_MAP)).has(stage)) {
return STAGE_MAP[stage];
} else {
console.warn(
`An invalid stage was passed in: "${stage}"; will use "dev" as default`
);
return "dev";
}
}

@@ -57,0 +60,0 @@

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