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

babel-plugin-captains-log

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-captains-log - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

41

dist/index.js

@@ -7,4 +7,26 @@ "use strict";

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _keys = require("babel-runtime/core-js/object/keys");
var _keys2 = _interopRequireDefault(_keys);
var _defineProperty2 = require("babel-runtime/helpers/defineProperty");
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _values = require("babel-runtime/core-js/object/values");
var _values2 = _interopRequireDefault(_values);
var _extends3 = require("babel-runtime/helpers/extends");
var _extends4 = _interopRequireDefault(_extends3);
var _objectWithoutProperties2 = require("babel-runtime/helpers/objectWithoutProperties");
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
var _toConsumableArray2 = require("babel-runtime/helpers/toConsumableArray");
var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
exports.default = function (_ref) {

@@ -60,5 +82,5 @@ var t = _ref.types;

if (t.isIdentifier(arg)) {
return [].concat(_toConsumableArray(acc), [t.stringLiteral(arg.name), arg]);
return [].concat((0, _toConsumableArray3.default)(acc), [t.stringLiteral(arg.name), arg]);
}
return [].concat(_toConsumableArray(acc), [arg]);
return [].concat((0, _toConsumableArray3.default)(acc), [arg]);
}, []);

@@ -69,9 +91,8 @@ };

var methods = opts.methods,
flags = _objectWithoutProperties(opts, ["methods"]);
flags = (0, _objectWithoutProperties3.default)(opts, ["methods"]);
// output speards the flags over each method
// in the future this could be expanded to allow method level config
return (methods || defaultMethods).reduce(function (acc, curr) {
return _extends({}, acc, _defineProperty({}, curr, Object.values(flags).length ? flags : defaultSettings));
return (0, _extends4.default)({}, acc, (0, _defineProperty3.default)({}, curr, (0, _values2.default)(flags).length ? flags : defaultSettings));
}, {});

@@ -102,3 +123,3 @@ };

var settings = buildSettings(opts || {});
if (!Object.keys(settings).includes(path.node.property.name)) {
if (!(0, _keys2.default)(settings).includes(path.node.property.name)) {
return;

@@ -130,8 +151,4 @@ }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
var defaultSettings = {

@@ -138,0 +155,0 @@ injectScope: true,

{
"name": "babel-plugin-captains-log",
"version": "0.3.1",
"version": "0.3.2",
"files": [

@@ -52,3 +52,6 @@ "dist"

]
},
"dependencies": {
"babel-plugin-transform-runtime": "^6.23.0"
}
}
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