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

captain-invalid-goods

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

captain-invalid-goods - npm Package Compare versions

Comparing version 0.2.5 to 0.3.0

938

lib/index.js

@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) {

}
})(this, function(__WEBPACK_EXTERNAL_MODULE_6__) {
})(this, function(__WEBPACK_EXTERNAL_MODULE_9__) {
return /******/ (function(modules) { // webpackBootstrap

@@ -77,3 +77,3 @@ /******/ // The module cache

/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 511);
/******/ return __webpack_require__(__webpack_require__.s = 495);
/******/ })

@@ -102,16 +102,7 @@ /************************************************************************/

/***/ 10:
/***/ (function(module, exports) {
module.exports = function(it){
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ 11:
/***/ (function(module, exports, __webpack_require__) {
// to indexed object, toObject with fallback for non-array-like ES3 strings
var IObject = __webpack_require__(42)
, defined = __webpack_require__(19);
var IObject = __webpack_require__(40)
, defined = __webpack_require__(17);
module.exports = function(it){

@@ -123,39 +114,83 @@ return IObject(defined(it));

/***/ 12:
/***/ (function(module, exports) {
/***/ 101:
/***/ (function(module, exports, __webpack_require__) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key){
return hasOwnProperty.call(it, key);
};
var $export = __webpack_require__(13);
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(7).f});
/***/ }),
/***/ 126:
/***/ 106:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(module, exports);
} else {
var mod = {
exports: {}
};
factory(mod, mod.exports);
global.readConfig = mod.exports;
}
})(this, function (module, exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var defaultConfig = {
env: '',
url: {
imgqn: 'https://img.yzcdn.cn',
cdn_static: 'https://b.yzcdn.cn/v2',
env: 'online'
}
};
exports.__esModule = true;
/**
* 读取 _global config
* @memberof module:url
* @param {string} key 需要从 _global 读取的字段
* @return {any} 返回读取到的值
* @example
* readConfig('url.env');
* // "online"
*/
function readConfig(key) {
var result = '';
try {
var readGlobalFunc = new Function('return window._global.' + key);
result = readGlobalFunc();
} catch (e) {}
var _defineProperty = __webpack_require__(127);
if (result) {
return result;
}
var _defineProperty2 = _interopRequireDefault(_defineProperty);
try {
var readDefaultFunc = new Function('var defaultConfig=' + JSON.stringify(defaultConfig) + ';return defaultConfig.' + key);
result = readDefaultFunc();
} catch (e) {}
return result;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports['default'] = readConfig;
module.exports = exports['default'];
});
exports.default = function (obj, key, value) {
if (key in obj) {
(0, _defineProperty2.default)(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
/***/ }),
return obj;
/***/ 11:
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function(it, key){
return hasOwnProperty.call(it, key);
};

@@ -165,16 +200,18 @@

/***/ 127:
/***/ (function(module, exports, __webpack_require__) {
/***/ 114:
/***/ (function(module, exports) {
module.exports = { "default": __webpack_require__(128), __esModule: true };
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 128:
/***/ (function(module, exports, __webpack_require__) {
/***/ 12:
/***/ (function(module, exports) {
__webpack_require__(130);
var $Object = __webpack_require__(1).Object;
module.exports = function defineProperty(it, key, desc){
return $Object.defineProperty(it, key, desc);
module.exports = function(exec){
try {
return !!exec();
} catch(e){
return true;
}
};

@@ -189,4 +226,4 @@

, core = __webpack_require__(1)
, ctx = __webpack_require__(15)
, hide = __webpack_require__(9)
, ctx = __webpack_require__(14)
, hide = __webpack_require__(6)
, PROTOTYPE = 'prototype';

@@ -252,214 +289,7 @@

/***/ 130:
/***/ (function(module, exports, __webpack_require__) {
var $export = __webpack_require__(13);
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
$export($export.S + $export.F * !__webpack_require__(5), 'Object', {defineProperty: __webpack_require__(8).f});
/***/ }),
/***/ 131:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(137)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(module, exports, require('./readConfig'));
} else {
var mod = {
exports: {}
};
factory(mod, mod.exports, global.readConfig);
global.helper = mod.exports;
}
})(this, function (module, exports, _readConfig) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _readConfig2 = _interopRequireDefault(_readConfig);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function getCdnImageUrl(url, parameter) {
if (!url) {
return (0, _readConfig2['default'])('url.cdn_static') + '/image/wap/no_pic.png';
}
// 如果已经是指定尺寸的 cdn 地址,不改尺寸
if (url.match(/.+!\d+x\d+.+/)) {
parameter = '';
} else {
parameter = !!parameter && parameter.length > 0 ? parameter : '!100x100.jpg';
}
if (!url.match(/^(https?:)?\/\//i)) {
return (0, _readConfig2['default'])('url.imgqn') + '/' + url + parameter;
}
var DOMAIN_REG_ARRAY = [/^(https?:)?\/\/imgqn.koudaitong.com/, /^(https?:)?\/\/kdt-img.koudaitong.com/, /^(https?:)?\/\/img.yzcdn.cn/, /^(https?:)?\/\/dn-kdt-img.qbox.me/];
for (var i = 0; i < DOMAIN_REG_ARRAY.length; i++) {
// eslint-disable-line
// 并不是所有的域都支持HTTPS,所以把这些域替换成支持HTTPS的
url = url.replace(DOMAIN_REG_ARRAY[i], (0, _readConfig2['default'])('url.imgqn'));
}
return url + parameter;
}
function site(url, prefix) {
var env = (0, _readConfig2['default'])('env');
var base = (0, _readConfig2['default'])('url');
if (prefix === 'static' && env === 'online') {
prefix = 'cdn_static';
}
var result = url;
prefix = prefix ? base[prefix] || '' : '';
if (url.search(/^http[s]?:\/\//) === -1) {
if (url[0] !== '/') {
url = '/' + url;
}
result = prefix + url;
}
return result;
}
/**
* @memberof module:url
* @name helper
* @description
* ### 对URL的操作
* 1. **helper.getCdnImageUrl**: 获取图片 CDN 地址
*
* - 参数1:**url(string)**,url 图片 URL
* - 参数2:**parameter(string)**,后缀参数
* - 返回值:格式化后的图片 URL
*
* ```js
* helper.getCdnImageUrl();
* // "https://b.yzcdn.cn/v2/image/wap/no_pic.png"
* ```
* 2. **helper.site**: 根据环境拼接 URL
*
* - 参数1:**url(string)** 指定的URL
* - 参数2:**prefix(string)** 域名前缀类型
* - 返回值:处理后的 URL
*
* ```js
* helper.site('test.html');
* // "/test.html"
* ```
*/
exports['default'] = {
site: site,
getCdnImageUrl: getCdnImageUrl
};
module.exports = exports['default'];
});
/***/ }),
/***/ 137:
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(module, exports);
} else {
var mod = {
exports: {}
};
factory(mod, mod.exports);
global.readConfig = mod.exports;
}
})(this, function (module, exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var defaultConfig = {
env: '',
url: {
imgqn: 'https://img.yzcdn.cn',
cdn_static: 'https://b.yzcdn.cn/v2',
env: 'online'
}
};
/**
* 读取 _global config
* @memberof module:url
* @param {string} key 需要从 _global 读取的字段
* @return {any} 返回读取到的值
* @example
* readConfig('url.env');
* // "online"
*/
function readConfig(key) {
var result = '';
try {
var readGlobalFunc = new Function('return window._global.' + key);
result = readGlobalFunc();
} catch (e) {}
if (result) {
return result;
}
try {
var readDefaultFunc = new Function('var defaultConfig=' + JSON.stringify(defaultConfig) + ';return defaultConfig.' + key);
result = readDefaultFunc();
} catch (e) {}
return result;
}
exports['default'] = readConfig;
module.exports = exports['default'];
});
/***/ }),
/***/ 139:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 14:
/***/ (function(module, exports) {
module.exports = function(exec){
try {
return !!exec();
} catch(e){
return true;
}
};
/***/ }),
/***/ 15:
/***/ (function(module, exports, __webpack_require__) {
// optional / simple context binding
var aFunction = __webpack_require__(22);
var aFunction = __webpack_require__(20);
module.exports = function(fn, that, length){

@@ -486,3 +316,3 @@ aFunction(fn);

/***/ 16:
/***/ 15:
/***/ (function(module, exports) {

@@ -498,27 +328,13 @@

/***/ 178:
/***/ 152:
/***/ (function(module, exports, __webpack_require__) {
module.exports = { "default": __webpack_require__(180), __esModule: true };
module.exports = { "default": __webpack_require__(155), __esModule: true };
/***/ }),
/***/ 18:
/***/ (function(module, exports) {
module.exports = function(bitmap, value){
return {
enumerable : !(bitmap & 1),
configurable: !(bitmap & 2),
writable : !(bitmap & 4),
value : value
};
};
/***/ }),
/***/ 180:
/***/ 155:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(182);
__webpack_require__(158);
module.exports = __webpack_require__(1).Object.assign;

@@ -528,3 +344,3 @@

/***/ 181:
/***/ 157:
/***/ (function(module, exports, __webpack_require__) {

@@ -535,11 +351,11 @@

// 19.1.2.1 Object.assign(target, source, ...)
var getKeys = __webpack_require__(29)
, gOPS = __webpack_require__(70)
, pIE = __webpack_require__(44)
, toObject = __webpack_require__(40)
, IObject = __webpack_require__(42)
var getKeys = __webpack_require__(28)
, gOPS = __webpack_require__(69)
, pIE = __webpack_require__(49)
, toObject = __webpack_require__(38)
, IObject = __webpack_require__(40)
, $assign = Object.assign;
// should work with symbols and should have deterministic property order (V8 bug)
module.exports = !$assign || __webpack_require__(14)(function(){
module.exports = !$assign || __webpack_require__(12)(function(){
var A = {}

@@ -570,3 +386,3 @@ , B = {}

/***/ 182:
/***/ 158:
/***/ (function(module, exports, __webpack_require__) {

@@ -577,7 +393,7 @@

$export($export.S + $export.F, 'Object', {assign: __webpack_require__(181)});
$export($export.S + $export.F, 'Object', {assign: __webpack_require__(157)});
/***/ }),
/***/ 19:
/***/ 17:
/***/ (function(module, exports) {

@@ -593,3 +409,3 @@

/***/ 20:
/***/ 18:
/***/ (function(module, exports) {

@@ -606,8 +422,12 @@

/***/ 22:
/***/ 19:
/***/ (function(module, exports) {
module.exports = function(it){
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
module.exports = function(bitmap, value){
return {
enumerable : !(bitmap & 1),
configurable: !(bitmap & 2),
writable : !(bitmap & 4),
value : value
};
};

@@ -617,11 +437,8 @@

/***/ 23:
/***/ (function(module, exports, __webpack_require__) {
/***/ 20:
/***/ (function(module, exports) {
var isObject = __webpack_require__(10)
, document = __webpack_require__(0).document
// in old IE typeof document.createElement is 'object'
, is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
return is ? document.createElement(it) : {};
if(typeof it != 'function')throw TypeError(it + ' is not a function!');
return it;
};

@@ -631,3 +448,3 @@

/***/ 233:
/***/ 208:
/***/ (function(module, exports, __webpack_require__) {

@@ -640,3 +457,3 @@

var _assign = __webpack_require__(178);
var _assign = __webpack_require__(152);

@@ -663,7 +480,20 @@ var _assign2 = _interopRequireDefault(_assign);

/***/ 27:
/***/ 21:
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(32)('keys')
, uid = __webpack_require__(28);
var isObject = __webpack_require__(8)
, document = __webpack_require__(0).document
// in old IE typeof document.createElement is 'object'
, is = isObject(document) && isObject(document.createElement);
module.exports = function(it){
return is ? document.createElement(it) : {};
};
/***/ }),
/***/ 23:
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(30)('keys')
, uid = __webpack_require__(25);
module.exports = function(key){

@@ -675,3 +505,3 @@ return shared[key] || (shared[key] = uid(key));

/***/ 28:
/***/ 25:
/***/ (function(module, exports) {

@@ -687,8 +517,8 @@

/***/ 29:
/***/ 28:
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__(41)
, enumBugKeys = __webpack_require__(30);
var $keys = __webpack_require__(39)
, enumBugKeys = __webpack_require__(29);

@@ -701,3 +531,3 @@ module.exports = Object.keys || function keys(O){

/***/ 30:
/***/ 29:
/***/ (function(module, exports) {

@@ -712,87 +542,5 @@

/***/ 32:
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(0)
, SHARED = '__core-js_shared__'
, store = global[SHARED] || (global[SHARED] = {});
module.exports = function(key){
return store[key] || (store[key] = {});
};
/***/ }),
/***/ 328:
/***/ 3:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 34:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(10);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S){
if(!isObject(it))return it;
var fn, val;
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ 35:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(20)
, min = Math.min;
module.exports = function(it){
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ 389:
/***/ (function(module, exports, __webpack_require__) {
function injectStyle (ssrContext) {
__webpack_require__(569)
}
var Component = __webpack_require__(4)(
/* script */
__webpack_require__(438),
/* template */
__webpack_require__(692),
/* styles */
injectStyle,
/* scopeId */
null,
/* moduleIdentifier (server only) */
null
)
module.exports = Component.exports
/***/ }),
/***/ 39:
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(5) && !__webpack_require__(14)(function(){
return Object.defineProperty(__webpack_require__(23)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ }),
/***/ 4:
/***/ (function(module, exports) {
/* globals __VUE_SSR_CONTEXT__ */

@@ -893,7 +641,89 @@

/***/ 40:
/***/ 30:
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(0)
, SHARED = '__core-js_shared__'
, store = global[SHARED] || (global[SHARED] = {});
module.exports = function(key){
return store[key] || (store[key] = {});
};
/***/ }),
/***/ 302:
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ 32:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.1 ToPrimitive(input [, PreferredType])
var isObject = __webpack_require__(8);
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function(it, S){
if(!isObject(it))return it;
var fn, val;
if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ 34:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.15 ToLength
var toInteger = __webpack_require__(18)
, min = Math.min;
module.exports = function(it){
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
};
/***/ }),
/***/ 36:
/***/ (function(module, exports, __webpack_require__) {
module.exports = !__webpack_require__(4) && !__webpack_require__(12)(function(){
return Object.defineProperty(__webpack_require__(21)('div'), 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ }),
/***/ 365:
/***/ (function(module, exports, __webpack_require__) {
function injectStyle (ssrContext) {
__webpack_require__(558)
}
var Component = __webpack_require__(3)(
/* script */
__webpack_require__(417),
/* template */
__webpack_require__(691),
/* styles */
injectStyle,
/* scopeId */
null,
/* moduleIdentifier (server only) */
null
)
module.exports = Component.exports
/***/ }),
/***/ 38:
/***/ (function(module, exports, __webpack_require__) {
// 7.1.13 ToObject(argument)
var defined = __webpack_require__(19);
var defined = __webpack_require__(17);
module.exports = function(it){

@@ -905,9 +735,9 @@ return Object(defined(it));

/***/ 41:
/***/ 39:
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(12)
, toIObject = __webpack_require__(11)
, arrayIndexOf = __webpack_require__(51)(false)
, IE_PROTO = __webpack_require__(27)('IE_PROTO');
var has = __webpack_require__(11)
, toIObject = __webpack_require__(10)
, arrayIndexOf = __webpack_require__(42)(false)
, IE_PROTO = __webpack_require__(23)('IE_PROTO');

@@ -929,7 +759,17 @@ module.exports = function(object, names){

/***/ 42:
/***/ 4:
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(12)(function(){
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ }),
/***/ 40:
/***/ (function(module, exports, __webpack_require__) {
// fallback for non-array-like ES3 and non-enumerable old V8 strings
var cof = __webpack_require__(16);
var cof = __webpack_require__(15);
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){

@@ -941,3 +781,3 @@ return cof(it) == 'String' ? it.split('') : Object(it);

/***/ 438:
/***/ 417:
/***/ (function(module, exports, __webpack_require__) {

@@ -952,7 +792,7 @@

var _extends2 = __webpack_require__(233);
var _extends2 = __webpack_require__(208);
var _extends3 = _interopRequireDefault(_extends2);
var _defineProperty2 = __webpack_require__(126);
var _defineProperty2 = __webpack_require__(95);

@@ -1002,13 +842,13 @@ var _defineProperty3 = _interopRequireDefault(_defineProperty2);

var _helper = __webpack_require__(131);
var _helper = __webpack_require__(94);
var _helper2 = _interopRequireDefault(_helper);
var _vant = __webpack_require__(6);
var _vant = __webpack_require__(9);
__webpack_require__(139);
__webpack_require__(114);
__webpack_require__(76);
__webpack_require__(92);
__webpack_require__(328);
__webpack_require__(302);

@@ -1071,27 +911,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/***/ 44:
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ 5:
/***/ 42:
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__(14)(function(){
return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
});
/***/ }),
/***/ 51:
/***/ (function(module, exports, __webpack_require__) {
// false -> Array#indexOf
// true -> Array#includes
var toIObject = __webpack_require__(11)
, toLength = __webpack_require__(35)
, toIndex = __webpack_require__(55);
var toIObject = __webpack_require__(10)
, toLength = __webpack_require__(34)
, toIndex = __webpack_require__(43);
module.exports = function(IS_INCLUDES){

@@ -1116,5 +939,25 @@ return function($this, el, fromIndex){

/***/ 511:
/***/ 43:
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(18)
, max = Math.max
, min = Math.min;
module.exports = function(index, length){
index = toInteger(index);
return index < 0 ? max(index + length, 0) : min(index, length);
};
/***/ }),
/***/ 49:
/***/ (function(module, exports) {
exports.f = {}.propertyIsEnumerable;
/***/ }),
/***/ 495:
/***/ (function(module, exports, __webpack_require__) {
"use strict";

@@ -1127,3 +970,3 @@

var _main = __webpack_require__(389);
var _main = __webpack_require__(365);

@@ -1138,11 +981,9 @@ var _main2 = _interopRequireDefault(_main);

/***/ 55:
/***/ 5:
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(20)
, max = Math.max
, min = Math.min;
module.exports = function(index, length){
index = toInteger(index);
return index < 0 ? max(index + length, 0) : min(index, length);
var isObject = __webpack_require__(8);
module.exports = function(it){
if(!isObject(it))throw TypeError(it + ' is not an object!');
return it;
};

@@ -1152,3 +993,3 @@

/***/ 569:
/***/ 558:
/***/ (function(module, exports) {

@@ -1161,9 +1002,23 @@

/***/ 6:
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(7)
, createDesc = __webpack_require__(19);
module.exports = __webpack_require__(4) ? function(object, key, value){
return dP.f(object, key, createDesc(1, value));
} : function(object, key, value){
object[key] = value;
return object;
};
/***/ }),
/***/ 69:
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_6__;
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ 692:
/***/ 691:
/***/ (function(module, exports) {

@@ -1250,6 +1105,26 @@

var isObject = __webpack_require__(10);
var anObject = __webpack_require__(5)
, IE8_DOM_DEFINE = __webpack_require__(36)
, toPrimitive = __webpack_require__(32)
, dP = Object.defineProperty;
exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if(IE8_DOM_DEFINE)try {
return dP(O, P, Attributes);
} catch(e){ /* empty */ }
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
if('value' in Attributes)O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ 8:
/***/ (function(module, exports) {
module.exports = function(it){
if(!isObject(it))throw TypeError(it + ' is not an object!');
return it;
return typeof it === 'object' ? it !== null : typeof it === 'function';
};

@@ -1259,10 +1134,10 @@

/***/ 70:
/***/ 9:
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
module.exports = __WEBPACK_EXTERNAL_MODULE_9__;
/***/ }),
/***/ 76:
/***/ 92:
/***/ (function(module, exports) {

@@ -1274,20 +1149,141 @@

/***/ 8:
/***/ 94:
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(7)
, IE8_DOM_DEFINE = __webpack_require__(39)
, toPrimitive = __webpack_require__(34)
, dP = Object.defineProperty;
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [module, exports, __webpack_require__(106)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports !== "undefined") {
factory(module, exports, require('./readConfig'));
} else {
var mod = {
exports: {}
};
factory(mod, mod.exports, global.readConfig);
global.helper = mod.exports;
}
})(this, function (module, exports, _readConfig) {
'use strict';
exports.f = __webpack_require__(5) ? Object.defineProperty : function defineProperty(O, P, Attributes){
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if(IE8_DOM_DEFINE)try {
return dP(O, P, Attributes);
} catch(e){ /* empty */ }
if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
if('value' in Attributes)O[P] = Attributes.value;
return O;
Object.defineProperty(exports, "__esModule", {
value: true
});
var _readConfig2 = _interopRequireDefault(_readConfig);
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function getCdnImageUrl(url, parameter) {
if (!url) {
return (0, _readConfig2['default'])('url.cdn_static') + '/image/wap/no_pic.png';
}
// 如果已经是指定尺寸的 cdn 地址,不改尺寸
if (url.match(/.+!\d+x\d+.+/)) {
parameter = '';
} else {
parameter = !!parameter && parameter.length > 0 ? parameter : '!100x100.jpg';
}
if (!url.match(/^(https?:)?\/\//i)) {
return (0, _readConfig2['default'])('url.imgqn') + '/' + url + parameter;
}
var DOMAIN_REG_ARRAY = [/^(https?:)?\/\/imgqn.koudaitong.com/, /^(https?:)?\/\/kdt-img.koudaitong.com/, /^(https?:)?\/\/img.yzcdn.cn/, /^(https?:)?\/\/dn-kdt-img.qbox.me/];
for (var i = 0; i < DOMAIN_REG_ARRAY.length; i++) {
// eslint-disable-line
// 并不是所有的域都支持HTTPS,所以把这些域替换成支持HTTPS的
url = url.replace(DOMAIN_REG_ARRAY[i], (0, _readConfig2['default'])('url.imgqn'));
}
return url + parameter;
}
function site(url, prefix) {
var env = (0, _readConfig2['default'])('env');
var base = (0, _readConfig2['default'])('url');
if (prefix === 'static' && env === 'online') {
prefix = 'cdn_static';
}
var result = url;
prefix = prefix ? base[prefix] || '' : '';
if (url.search(/^http[s]?:\/\//) === -1) {
if (url[0] !== '/') {
url = '/' + url;
}
result = prefix + url;
}
return result;
}
/**
* @memberof module:url
* @name helper
* @description
* ### 对URL的操作
* 1. **helper.getCdnImageUrl**: 获取图片 CDN 地址
*
* - 参数1:**url(string)**,url 图片 URL
* - 参数2:**parameter(string)**,后缀参数
* - 返回值:格式化后的图片 URL
*
* ```js
* helper.getCdnImageUrl();
* // "https://b.yzcdn.cn/v2/image/wap/no_pic.png"
* ```
* 2. **helper.site**: 根据环境拼接 URL
*
* - 参数1:**url(string)** 指定的URL
* - 参数2:**prefix(string)** 域名前缀类型
* - 返回值:处理后的 URL
*
* ```js
* helper.site('test.html');
* // "/test.html"
* ```
*/
exports['default'] = {
site: site,
getCdnImageUrl: getCdnImageUrl
};
module.exports = exports['default'];
});
/***/ }),
/***/ 95:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
var _defineProperty = __webpack_require__(96);
var _defineProperty2 = _interopRequireDefault(_defineProperty);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = function (obj, key, value) {
if (key in obj) {
(0, _defineProperty2.default)(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};

@@ -1297,12 +1293,16 @@

/***/ 9:
/***/ 96:
/***/ (function(module, exports, __webpack_require__) {
var dP = __webpack_require__(8)
, createDesc = __webpack_require__(18);
module.exports = __webpack_require__(5) ? function(object, key, value){
return dP.f(object, key, createDesc(1, value));
} : function(object, key, value){
object[key] = value;
return object;
module.exports = { "default": __webpack_require__(97), __esModule: true };
/***/ }),
/***/ 97:
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(101);
var $Object = __webpack_require__(1).Object;
module.exports = function defineProperty(it, key, desc){
return $Object.defineProperty(it, key, desc);
};

@@ -1309,0 +1309,0 @@

{
"name": "captain-invalid-goods",
"version": "0.2.5",
"version": "0.3.0",
"description": "不可用商品列表组件",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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