tiny-invariant
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "tiny-invariant", | ||
"version": "0.0.1", | ||
"description": "A super tiny invariant function", | ||
"version": "0.0.2", | ||
"description": "A tiny invariant function", | ||
"main": "dist/react-beautiful-dnd.cjs.js", | ||
"module": "dist/react-beautiful-dnd.esm.js", | ||
"sideEffects": false, | ||
"files": ["/dist", "/src"], | ||
"files": [ | ||
"/dist", | ||
"/src" | ||
], | ||
"author": "Alex Reardon <alexreardon@gmail.com>", | ||
@@ -15,11 +18,21 @@ "license": "MIT", | ||
"typecheck": "yarn flow", | ||
"validate": "yarn lint && yarn flow" | ||
"validate": "yarn lint && yarn flow", | ||
"build:clean": "rimraf dist", | ||
"build:flow": "echo \"// @flow\n\nexport * from '../src';\" > dist/react-beautiful-dnd.cjs.js.flow", | ||
"build:dist": "yarn rollup --config rollup.config.js", | ||
"build": "yarn build:clean && yarn build:dist && yarn build:flow", | ||
"prepublishOnly": "yarn build" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.0", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-flow": "^6.23.0", | ||
"flow-bin": "^0.70.0", | ||
"jest": "^22.4.3", | ||
"prettier": "^1.12.1" | ||
"prettier": "^1.12.1", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.58.0", | ||
"rollup-plugin-babel": "^3.0.3" | ||
} | ||
} |
@@ -8,3 +8,4 @@ // @flow | ||
// Strip out error messages for production | ||
export default (condition: mixed, message?: string = '') => { | ||
// > Not providing an inline default argument for message as the result is smaller | ||
export default (condition: mixed, message?: string) => { | ||
if (condition) { | ||
@@ -22,3 +23,3 @@ return; | ||
// In other environments we throw with the message | ||
throw new Error(`${prefix}: ${message}`); | ||
throw new Error(`${prefix}: ${message || ''}`); | ||
}; |
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
2420
5
43
10