tiny-warning
Advanced tools
Comparing version 1.0.2 to 1.0.3
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | ||
typeof define === 'function' && define.amd ? define(factory) : | ||
global.warning = factory(); | ||
}(typeof self !== 'undefined' ? self : this, function () { 'use strict'; | ||
(global = global || self, global.warning = factory()); | ||
}(this, function () { 'use strict'; | ||
@@ -7,0 +7,0 @@ function warning(condition, message) { |
@@ -1,1 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.warning=n()}("undefined"!=typeof self?self:this,function(){"use strict";return function(e,n){}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e=e||self).warning=n()}(this,function(){"use strict";return function(e,n){}}); |
{ | ||
"name": "tiny-warning", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"keywords": [ | ||
@@ -11,2 +11,3 @@ "warning", | ||
"module": "dist/tiny-warning.esm.js", | ||
"types": "src/index.d.ts", | ||
"sideEffects": false, | ||
@@ -20,4 +21,7 @@ "files": [ | ||
"type": "git", | ||
"url": "git+https://github.com/alexreardon/tiny-warning.git" | ||
"url": "https://github.com/alexreardon/tiny-warning.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/alexreardon/tiny-warning/issues" | ||
}, | ||
"license": "MIT", | ||
@@ -36,16 +40,17 @@ "scripts": { | ||
"devDependencies": { | ||
"@babel/core": "^7.2.2", | ||
"@babel/preset-env": "^7.2.0", | ||
"@babel/core": "^7.5.0", | ||
"@babel/preset-env": "^7.5.0", | ||
"@babel/preset-flow": "^7.0.0", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-jest": "^23.6.0", | ||
"flow-bin": "0.89.0", | ||
"jest": "^23.6.0", | ||
"prettier": "1.15.3", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.68.0", | ||
"rollup-plugin-babel": "^4.1.0", | ||
"rollup-plugin-replace": "^2.1.0", | ||
"rollup-plugin-uglify": "^6.0.0" | ||
"babel-jest": "^24.8.0", | ||
"flow-bin": "0.102.0", | ||
"jest": "^24.8.0", | ||
"prettier": "1.18.2", | ||
"regenerator-runtime": "^0.13.2", | ||
"rimraf": "^2.6.3", | ||
"rollup": "^1.16.6", | ||
"rollup-plugin-babel": "^4.3.3", | ||
"rollup-plugin-replace": "^2.2.0", | ||
"rollup-plugin-uglify": "^6.0.2" | ||
} | ||
} |
@@ -16,3 +16,3 @@ # tiny-warning 🔬⚠️ | ||
warning(falsyValue, 'This should log a warning'); | ||
// console.warn('This should log a warning'); | ||
// console.warn('Warning: This should log a warning'); | ||
``` | ||
@@ -19,0 +19,0 @@ |
// @flow | ||
const isProduction: boolean = process.env.NODE_ENV === 'production'; | ||
export default function warning(condition: mixed, message: string) { | ||
export default function warning(condition: mixed, message: string): void { | ||
// don't do anything in production | ||
@@ -6,0 +6,0 @@ // wrapping in production check for better dead code elimination |
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
8309
10
82
1
14