babel-plugin-debug-macros
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -33,21 +33,9 @@ 'use strict'; | ||
* | ||
* or (when `assertPredicateIndex` specified) | ||
* or | ||
* | ||
* ($DEBUG && $PREDICATE && console.assert(false, $MESSAGE)); | ||
* | ||
* or (`{ externalizeHelpers: { module: true } }`) | ||
* | ||
* ($DEBUG && assert($PREDICATE, $MESSAGE)); | ||
* | ||
* or (when `{ externalizeHelpers: { module: true }, debugTools: { source: '...', assertPredicateIndex: 0 } }` specified) | ||
* or | ||
* | ||
* ($DEBUG && $PREDICATE && assert(false, $MESSAGE)); | ||
* | ||
* or (when `{ externalizeHelpers: { global: '$GLOBLA_NS' }` specified) | ||
* | ||
* ($DEBUG && $GLOBAL_NS.assert($PREDICATE, $MESSAGE)); | ||
* | ||
* or (when `{ externalizeHelpers: { global: '$GLOBLA_NS' }, debugTools: { source: '...', assertPredicateIndex: 0 } }` specified) | ||
* | ||
* ($DEBUG && $PREDICATE && $GLOBAL_NS.assert(false, $MESSAGE)); | ||
*/ | ||
@@ -64,6 +52,3 @@ | ||
predicate = function predicate(expression, args) { | ||
var predicate = args[_this.assertPredicateIndex]; | ||
args[_this.assertPredicateIndex] = _this.t.identifier('false'); | ||
return predicate; | ||
return args[_this.assertPredicateIndex]; | ||
}; | ||
@@ -186,7 +171,7 @@ } | ||
* | ||
* ($DEBUG && $PREDICATE && deprecate($MESSAGE, false, { $ID, $URL, $UNTIL })); | ||
* ($DEBUG && $PREDICATE && deprecate($MESSAGE, $PREDICATE, { $ID, $URL, $UNTIL })); | ||
* | ||
* or | ||
* | ||
* ($DEBUG && $PREDICATE && $GLOBAL_NS.deprecate($MESSAGE, false, { $ID, $URL, $UNTIL })); | ||
* ($DEBUG && $PREDICATE && $GLOBAL_NS.deprecate($MESSAGE, $PREDICATE, { $ID, $URL, $UNTIL })); | ||
*/ | ||
@@ -201,13 +186,8 @@ | ||
predicate: function predicate(expression, args) { | ||
var _args = _slicedToArray(args, 2), | ||
predicate = _args[1]; | ||
args[1] = _this2.t.identifier('false'); | ||
return predicate; | ||
return args[1]; | ||
}, | ||
buildConsoleAPI: function buildConsoleAPI(expression, args) { | ||
var _args2 = _slicedToArray(args, 1), | ||
message = _args2[0]; | ||
var _args = _slicedToArray(args, 1), | ||
message = _args[0]; | ||
@@ -218,4 +198,4 @@ return _this2._createConsoleAPI(_this2.t.identifier('warn'), [message]); | ||
validate: function validate(expression, args) { | ||
var _args3 = _slicedToArray(args, 3), | ||
meta = _args3[2]; | ||
var _args2 = _slicedToArray(args, 3), | ||
meta = _args2[2]; | ||
@@ -222,0 +202,0 @@ if (meta && meta.properties && !meta.properties.some(function (prop) { |
@@ -13,3 +13,3 @@ { | ||
"name": "babel-plugin-debug-macros", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Debug macros and feature flag stripping", | ||
@@ -16,0 +16,0 @@ "main": "dist/index.js", |
27127
597