Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tiny-warning

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny-warning - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

13

dist/tiny-warning.cjs.js
'use strict';
var isProduction = process.env.NODE_ENV === 'production';
var index = (function (condition, message) {
if (isProduction) {
return;
}
if (process.env.NODE_ENV !== 'production') {
if (condition) {
return;
}
if (condition) {
return;
console.warn(message);
}
console.warn(message);
});
module.exports = index;
var isProduction = process.env.NODE_ENV === 'production';
var index = (function (condition, message) {
if (isProduction) {
return;
}
if (process.env.NODE_ENV !== 'production') {
if (condition) {
return;
}
if (condition) {
return;
console.warn(message);
}
console.warn(message);
});
export default index;

@@ -8,8 +8,9 @@ (function (global, factory) {

var index = (function (condition, message) {
{
if (condition) {
return;
}
if (condition) {
return;
console.warn(message);
}
console.warn(message);
});

@@ -16,0 +17,0 @@

@@ -1,1 +0,12 @@

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.warning=n()}(this,function(){"use strict";return function(e,n){}});
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.warning = factory());
}(this, (function () { 'use strict';
var index = (function (condition, message) {
});
return index;
})));
{
"name": "tiny-warning",
"version": "0.0.1",
"version": "0.0.2",
"keywords": [

@@ -30,16 +30,16 @@ "warning",

"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"babel-preset-env": "^1.7.0",
"babel-preset-flow": "^6.23.0",
"flow-bin": "^0.78.0",
"jest": "^23.5.0",
"prettier": "^1.14.2",
"@babel/core": "^7.1.2",
"@babel/preset-env": "^7.1.0",
"@babel/preset-flow": "^7.0.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"flow-bin": "^0.82.0",
"jest": "^23.6.0",
"prettier": "^1.14.3",
"rimraf": "^2.6.2",
"rollup": "^0.64.1",
"rollup-plugin-babel": "^3.0.7",
"rollup": "^0.66.2",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^4.0.0"
"rollup-plugin-uglify": "^6.0.0"
}
}

@@ -5,12 +5,11 @@ // @flow

export default (condition: mixed, message: string) => {
// in production: don't do anything
if (isProduction) {
return;
// wrapping entire block for better dead code elimination
if (process.env.NODE_ENV !== 'production') {
// condition passed: do not log
if (condition) {
return;
}
// Condition not passed
console.warn(message);
}
// condition passed: do not log
if (condition) {
return;
}
// Condition not passed
console.warn(message);
};
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