Socket
Socket
Sign inDemoInstall

@platform/util.is

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@platform/util.is - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

26

lib/index.d.ts

@@ -1,15 +0,11 @@

declare class Flags {
readonly nodeEnv: string;
readonly browser: boolean;
readonly dev: boolean;
readonly prod: boolean;
readonly test: boolean;
toObject(): {
nodeEnv: string;
browser: boolean;
dev: boolean;
prod: boolean;
};
}
export declare const is: Flags;
export {};
export declare type IFlags = {
nodeEnv: 'development' | 'production' | 'browser' | string;
browser: boolean;
dev: boolean;
prod: boolean;
test: boolean;
};
export declare type IIs = IFlags & {
toObject: () => IFlags;
};
export declare const is: IIs;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Flags = (function () {
function Flags() {
var Is = (function () {
function Is() {
}
Object.defineProperty(Flags.prototype, "nodeEnv", {
Object.defineProperty(Is.prototype, "nodeEnv", {
get: function () {

@@ -13,3 +13,3 @@ return this.browser ? 'browser' : process.env.NODE_ENV || 'development';

});
Object.defineProperty(Flags.prototype, "browser", {
Object.defineProperty(Is.prototype, "browser", {
get: function () {

@@ -21,3 +21,3 @@ return typeof window !== 'undefined';

});
Object.defineProperty(Flags.prototype, "dev", {
Object.defineProperty(Is.prototype, "dev", {
get: function () {

@@ -32,3 +32,3 @@ var env = this.nodeEnv;

});
Object.defineProperty(Flags.prototype, "prod", {
Object.defineProperty(Is.prototype, "prod", {
get: function () {

@@ -40,3 +40,3 @@ return !this.dev;

});
Object.defineProperty(Flags.prototype, "test", {
Object.defineProperty(Is.prototype, "test", {
get: function () {

@@ -48,3 +48,3 @@ return this.nodeEnv === 'test';

});
Flags.prototype.toObject = function () {
Is.prototype.toObject = function () {
return {

@@ -55,6 +55,7 @@ nodeEnv: this.nodeEnv,

prod: this.prod,
test: this.test,
};
};
return Flags;
return Is;
}());
exports.is = new Flags();
exports.is = new Is();
{
"name": "@platform/util.is",
"version": "0.0.9",
"version": "0.0.10",
"description": "Environment flags.",

@@ -5,0 +5,0 @@ "main": "lib/index",

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