abolish-browser
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -1,1 +0,1 @@ | ||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){var n=e[i][1][r];return o(n||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){const{Abolish:Abolish,Rule:Rule}=require("abolish");window.Abolish=Abolish;window.AbolishRule=Rule},{abolish:2}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Rule=exports.Abolish=void 0;const Abolish=require("./src/Abolish");exports.Abolish=Abolish;const Functions_1=require("./src/Functions");Object.defineProperty(exports,"Rule",{enumerable:true,get:function(){return Functions_1.Rule}})},{"./src/Abolish":3,"./src/Functions":5}],3:[function(require,module,exports){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};const StringToRules_1=__importDefault(require("./StringToRules"));const GlobalValidators_1=__importDefault(require("./GlobalValidators"));const Functions_1=require("./Functions");const AbolishError_1=__importDefault(require("./AbolishError"));const ObjectModifier_1=__importDefault(require("./ObjectModifier"));class Abolish{constructor(){this.validators={}}static addGlobalValidator(validator){if(typeof validator==="object"&&!Array.isArray(validator)){if(!validator.error)validator.error=`:param failed {${validator.name}} validation.`;GlobalValidators_1.default[validator.name]=validator}else{throw new TypeError("addGlobalValidator argument must be an object.")}}static addGlobalValidators(validators){if(Array.isArray(validators)){for(const value of validators){Abolish.addGlobalValidator(value)}}else{throw new TypeError("addGlobalValidators argument must be an array")}}addValidator(validator){if(typeof validator==="object"&&!Array.isArray(validator)){if(!validator.error)validator.error=`:param failed {${validator.name}} validation.`;this.validators[validator.name]=validator}else{throw new TypeError("addValidator argument must be an object.")}return this}addValidators(validators){if(Array.isArray(validators)){for(const value of validators){this.addValidator(value)}}else{throw new TypeError("addValidators argument must be an array")}return this}static validate(object,rules){return(new this).validate(object,rules)}static validateAsync(object,rules){return(new this).validateAsync(object,rules)}validate(object,rules,isAsync=false){let asyncData={validated:{},jobs:[]};let internalWildcardRules={};if(rules.hasOwnProperty("*")){internalWildcardRules=rules["*"];delete rules["*"];if(typeof internalWildcardRules==="string")internalWildcardRules=StringToRules_1.default(internalWildcardRules)}let validated={...object};const keysToBeValidated=Object.keys(rules);for(const rule of keysToBeValidated){let ruleData=rules[rule];if(ruleData==="*")ruleData={};if(typeof ruleData==="string")ruleData=StringToRules_1.default(ruleData);let $skip=false;if(ruleData.hasOwnProperty("$skip")){$skip=ruleData["$skip"];delete ruleData["$skip"];if(typeof $skip==="function"){$skip=$skip(validated[rule])}if(typeof $skip!=="boolean"){throw new Error(`$skip value or resolved function value must be a BOOLEAN in RuleFor: (${rule})`)}}if(!$skip){let $name=false;if(ruleData.hasOwnProperty("$name")){$name=ruleData["$name"];delete ruleData["$name"];if(typeof $name!=="string"){throw new Error(`$skip value or resolved function value must be a BOOLEAN in RuleFor: (${rule})`)}}let $error=false;if(ruleData.hasOwnProperty("$error")){$error=ruleData["$error"];delete ruleData["$error"];if(!$error||typeof $error!=="string"){throw new Error(`$error value must be a STRING in RuleFor: (${rule})`)}}ruleData={...internalWildcardRules,...ruleData};for(const validatorName of Object.keys(ruleData)){if(!this.validators.hasOwnProperty(validatorName)&&!GlobalValidators_1.default.hasOwnProperty(validatorName)){throw new Error(`Validator: {${validatorName}} does not exists but defined in rules`)}const validator=this.validators[validatorName]||GlobalValidators_1.default[validatorName];if(!isAsync&&validator.isAsync){throw new Error(`Validator: {${validatorName}} is async, use validateAsync method instead.`)}const validatorOption=ruleData[validatorName];const objectValue=validated[rule];if(isAsync){asyncData.jobs.push({$name:$name,rule:rule,validator:validator,validatorName:validatorName,validatorOption:validatorOption,$error:$error})}else{let validationResult=false;try{validationResult=validator.validator(objectValue,validatorOption,{error:(message,data)=>new AbolishError_1.default(message,data),modifier:new ObjectModifier_1.default(validated,rule)})}catch(e){return{error:{key:rule,type:"internal",validator:validatorName,message:e.message,data:e.stack}}}if(validationResult instanceof AbolishError_1.default){return{error:{key:rule,type:"validator",validator:validatorName,message:$error?$error:validationResult.message,data:validationResult.data}}}else if(validationResult===false){const optionIsStringable=typeof validatorOption==="string"||typeof validatorOption==="number"||Array.isArray(validatorOption);let message=($error?$error:validator.error).replace(":param",$name?$name:Functions_1.StartCase(rule));if(optionIsStringable)message=message.replace(":option",validatorOption);return{error:{key:rule,type:"validator",validator:validatorName,message:message,data:null}}}}}}}if(isAsync){asyncData.validated=validated;return asyncData}validated=Functions_1.Pick(validated,keysToBeValidated);return{error:false,validated:validated}}validateAsync(object,rules){const asyncData=this.validate(object,rules,true);const{validated:validated,jobs:jobs}=asyncData;const keysToBeValidated=Object.keys(rules);return new Promise((async resolve=>{for(const job of jobs){const{$name:$name,rule:rule,validator:validator,validatorName:validatorName,validatorOption:validatorOption,$error:$error}=job;const objectValue=validated[rule];let validationResult=false;try{validationResult=await validator.validator(objectValue,validatorOption,{error:(message,data)=>new AbolishError_1.default(message,data),modifier:new ObjectModifier_1.default(validated,rule)})}catch(e){return resolve({error:{key:rule,type:"internal",validator:validatorName,message:e.message,data:e.stack}})}if(validationResult instanceof AbolishError_1.default){return resolve({error:{key:rule,type:"validator",validator:validatorName,message:$error?$error:validationResult.message,data:validationResult.data}})}else if(validationResult===false){const optionIsStringable=typeof validatorOption==="string"||typeof validatorOption==="number";let message=($error?$error:validator.error).replace(":param",$name?$name:Functions_1.StartCase(rule));if(optionIsStringable)message=message.replace(":option",validatorOption);return resolve({error:{key:rule,type:"validator",validator:validatorName,message:message,data:null}})}}return resolve({error:false,validated:Functions_1.Pick(validated,keysToBeValidated)})}))}}module.exports=Abolish},{"./AbolishError":4,"./Functions":5,"./GlobalValidators":6,"./ObjectModifier":7,"./StringToRules":8}],4:[function(require,module,exports){"use strict";class AbolishError{constructor(message,data){this.message=message;if(data){this.data=data}else{this.data={}}return this}setData(data){this.data=data;return data}}module.exports=AbolishError},{}],5:[function(require,module,exports){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.Get=exports.Set=exports.Pick=exports.Rule=exports.StartCase=exports.UpperFirst=void 0;const StringToRules_1=__importDefault(require("./StringToRules"));function UpperFirst(str){return str[0].toUpperCase()+str.substr(1)}exports.UpperFirst=UpperFirst;function StartCase(str){if(str.indexOf("_")>=0)str=str.replace("_"," ");if(str.indexOf("-")>=0)str=str.replace("-"," ");return str.split(" ").map((word=>UpperFirst(word))).join(" ")}exports.StartCase=StartCase;function Rule(rules){if(!Array.isArray(rules)){rules=[rules]}let generatedRule={};for(let rule of rules){if(typeof rule==="string")rule=StringToRules_1.default(rule);generatedRule={...generatedRule,...rule}}return generatedRule}exports.Rule=Rule;function Pick(object,keys){return keys.reduce(((obj,key)=>{if(object&&object.hasOwnProperty(key)){obj[key]=object[key]}return obj}),{})}exports.Pick=Pick;function Set(object,path,value){if(Object(object)!==object)return object;if(!Array.isArray(path))path=path.toString().match(/[^.[\]]+/g)||[];path.slice(0,-1).reduce(((a,c,i)=>Object(a[c])===a[c]?a[c]:a[c]=Math.abs(path[i+1])>>0===+path[i+1]?[]:{}),object)[path[path.length-1]]=value;return object}exports.Set=Set;function Get(obj,path,defaultValue){const travel=regexp=>String.prototype.split.call(path,regexp).filter(Boolean).reduce(((res,key)=>res!==null&&res!==undefined?res[key]:res),obj);const result=travel(/[,[\]]+?/)||travel(/[,[\].]+?/);return result===undefined||result===obj?defaultValue:result}exports.Get=Get},{"./StringToRules":8}],6:[function(require,module,exports){"use strict";function trimIfString(value){return typeof value==="string"?value.trim():value}const GlobalValidators={must:{name:"must",error:":param is required.",validator:(value,option)=>{if(!option){return true}if(typeof value==="undefined"||value===null){return false}else if(typeof value==="string"||Array.isArray(value)){return value.length>0}return true}},typeof:{name:"typeof",error:":param is not typeOf :option",validator:(value,option)=>{if(option===false)return true;option=option.toLowerCase();if(option==="array")return Array.isArray(value);return typeof value===option}},exact:{name:"exact",validator:(value,option)=>value===option,error:":param failed exact validator"},min:{name:"min",error:":param is too small. (Min. :option)",validator:(value,option,helpers)=>{const isNotNumber=isNaN(value);if(typeof value==="string"&&isNotNumber||Array.isArray(value))return GlobalValidators.minLength.validator(value,option,helpers);if(isNotNumber)return false;return Number(value)>=Number(option)}},max:{name:"max",error:":param is too big. (Max. :option)",validator:(value,option,helpers)=>{const isNotNumber=isNaN(value);if(typeof value==="string"&&isNotNumber||Array.isArray(value))return GlobalValidators.maxLength.validator(value,option,helpers);if(isNotNumber)return false;return Number(value)<=Number(option)}},minLength:{name:"minLength",error:":param is too short. (Min. :option characters)",validator:(value,option)=>{if(typeof value!=="string"&&!Array.isArray(value))return false;value=trimIfString(value);return value.length>=Number(option)}},maxLength:{name:"maxLength",error:":param is too long. (Max. :option characters)",validator:(value,option)=>{if(typeof value!=="string"&&!Array.isArray(value))return false;value=trimIfString(value);return value.length<=Number(option)}},selectMin:{name:"selectMin",error:"Select at-least :option :param.",validator:(value,option,helpers)=>GlobalValidators.minLength.validator(value,option,helpers)},selectMax:{name:"selectMax",error:"Select at-most :option :param.",validator:(value,option,helpers)=>GlobalValidators.maxLength.validator(value,option,helpers)},$inline:{name:"$custom",error:":param failed inline validation.",validator:(v,o,helpers)=>o(v,helpers)}};GlobalValidators.required=Object.assign({},GlobalValidators.must);GlobalValidators.required.name="required";module.exports=GlobalValidators},{}],7:[function(require,module,exports){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};const Functions_1=require("./Functions");const lodash_has_1=__importDefault(require("lodash.has"));const lodash_unset_1=__importDefault(require("lodash.unset"));class ObjectModifier{constructor(data,param){this.data=data;this.path=param;return this}get(path,$default=undefined){return Functions_1.Get(this.data,path,$default)}has(path){return lodash_has_1.default(this.data,path)}set(path,value){return Functions_1.Set(this.data,path,value)}setThis(value){return this.set(this.path,value)}unset(path){return lodash_unset_1.default(this.data,path)}unsetThis(){return lodash_unset_1.default(this.data,this.path)}getPath(){return Functions_1.StartCase(this.path)}}module.exports=ObjectModifier},{"./Functions":5,"lodash.has":9,"lodash.unset":10}],8:[function(require,module,exports){"use strict";const onlyKey=new RegExp(/([!a-zA-Z_*0-9]+)/g);const keyColumnVal=new RegExp(/([a-zA-Z_*0-9]+:[a-zA-Z_0-9]+)/g);const keyColumnValStringDoubleQuotes=new RegExp(/([a-zA-Z_*0-9]+:"[^"]+")/g);const keyColumnValStringSingleQuotes=new RegExp(/([a-zA-Z_*0-9]+:'[^']+')/g);const keyColumnValStringGraveAccent=new RegExp(/([a-zA-Z_*0-9]+:`[^`]+`)/g);const StringToRules=str=>{let s=str.split("|");const keyColumnValObj={};for(let i=0;i<s.length;i++){const pair=s[i];if(pair.match(keyColumnValStringSingleQuotes)||pair.match(keyColumnValStringDoubleQuotes)||pair.match(keyColumnValStringGraveAccent)){const[key,...value]=pair.split(":");let valueToString=value.join(":");valueToString=valueToString.substr(1);valueToString=valueToString.substr(0,value.length-1);keyColumnValObj[key]=valueToString}else if(pair.match(keyColumnVal)){let[key,value]=pair.split(":");if(!isNaN(value)){value=Number(value)}keyColumnValObj[key]=value}else if(pair.match(onlyKey)){let key=pair;let value=true;if(key.substr(0,1)==="!"){key=key.substr(1);value=false}keyColumnValObj[key]=value}}return keyColumnValObj};module.exports=StringToRules},{}],9:[function(require,module,exports){(function(global){(function(){var FUNC_ERROR_TEXT="Expected a function";var HASH_UNDEFINED="__lodash_hash_undefined__";var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991;var argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]";var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reEscapeChar=/\\(\\)?/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var reIsUint=/^(?:0|[1-9]\d*)$/;var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();function getValue(object,key){return object==null?undefined:object[key]}function isHostObject(value){var result=false;if(value!=null&&typeof value.toString!="function"){try{result=!!(value+"")}catch(e){}}return result}var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();var funcToString=funcProto.toString;var hasOwnProperty=objectProto.hasOwnProperty;var objectToString=objectProto.toString;var reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Symbol=root.Symbol,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice;var Map=getNative(root,"Map"),nativeCreate=getNative(Object,"create");var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function Hash(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(key){return this.has(key)&&delete this.__data__[key]}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}return true}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){return getMapData(this,key)["delete"](key)}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){getMapData(this,key).set(key,value);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}function baseHas(object,key){return object!=null&&hasOwnProperty.call(object,key)}function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseToString(value){if(typeof value=="string"){return value}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function castPath(value){return isArray(value)?value:stringToPath(value)}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}function hasPath(object,path,hasFunc){path=isKey(path,object)?[path]:castPath(path);var result,index=-1,length=path.length;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break}object=object[key]}if(result){return result}var length=object?object.length:0;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function isIndex(value,length){length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(typeof value=="number"||reIsUint.test(value))&&(value>-1&&value%1==0&&value<length)}function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var stringToPath=memoize((function(string){string=toString(string);var result=[];if(reLeadingDot.test(string)){result.push("")}string.replace(rePropName,(function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}));return result}));function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function memoize(func,resolver){if(typeof func!="function"||resolver&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result);return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;function eq(value,other){return value===other||value!==value&&other!==other}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}var isArray=Array.isArray;function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isObjectLike(value){return!!value&&typeof value=="object"}function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return value==null?"":baseToString(value)}function has(object,path){return object!=null&&hasPath(object,path,baseHas)}module.exports=has}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],10:[function(require,module,exports){(function(global){(function(){var FUNC_ERROR_TEXT="Expected a function";var HASH_UNDEFINED="__lodash_hash_undefined__";var INFINITY=1/0;var funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]";var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reEscapeChar=/\\(\\)?/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();function getValue(object,key){return object==null?undefined:object[key]}function isHostObject(value){var result=false;if(value!=null&&typeof value.toString!="function"){try{result=!!(value+"")}catch(e){}}return result}var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();var funcToString=funcProto.toString;var hasOwnProperty=objectProto.hasOwnProperty;var objectToString=objectProto.toString;var reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Symbol=root.Symbol,splice=arrayProto.splice;var Map=getNative(root,"Map"),nativeCreate=getNative(Object,"create");var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function Hash(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(key){return this.has(key)&&delete this.__data__[key]}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}return true}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){return getMapData(this,key)["delete"](key)}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){getMapData(this,key).set(key,value);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}function baseGet(object,path){path=isKey(path,object)?[path]:castPath(path);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])]}return index&&index==length?object:undefined}function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseSlice(array,start,end){var index=-1,length=array.length;if(start<0){start=-start>length?0:length+start}end=end>length?length:end;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start]}return result}function baseToString(value){if(typeof value=="string"){return value}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function baseUnset(object,path){path=isKey(path,object)?[path]:castPath(path);object=parent(object,path);var key=toKey(last(path));return!(object!=null&&hasOwnProperty.call(object,key))||delete object[key]}function castPath(value){return isArray(value)?value:stringToPath(value)}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function parent(object,path){return path.length==1?object:baseGet(object,baseSlice(path,0,-1))}var stringToPath=memoize((function(string){string=toString(string);var result=[];if(reLeadingDot.test(string)){result.push("")}string.replace(rePropName,(function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}));return result}));function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function memoize(func,resolver){if(typeof func!="function"||resolver&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result);return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;function eq(value,other){return value===other||value!==value&&other!==other}var isArray=Array.isArray;function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isObjectLike(value){return!!value&&typeof value=="object"}function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return value==null?"":baseToString(value)}function unset(object,path){return object==null?true:baseUnset(object,path)}module.exports=unset}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1]); | ||
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,(function(r){var n=e[i][1][r];return o(n||r)}),p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){const{Abolish:Abolish,Rule:Rule,ParseRules:ParseRules}=require("abolish");window.Abolish=Abolish;window.AbolishRule=Rule;window.AbolishParseRules=ParseRules},{abolish:2}],2:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ParseRules=exports.Rule=exports.Abolish=void 0;const Abolish=require("./src/Abolish");exports.Abolish=Abolish;const Functions_1=require("./src/Functions");Object.defineProperty(exports,"Rule",{enumerable:true,get:function(){return Functions_1.Rule}});Object.defineProperty(exports,"ParseRules",{enumerable:true,get:function(){return Functions_1.ParseRules}})},{"./src/Abolish":3,"./src/Functions":5}],3:[function(require,module,exports){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};const StringToRules_1=__importDefault(require("./StringToRules"));const GlobalValidators_1=__importDefault(require("./GlobalValidators"));const Functions_1=require("./Functions");const AbolishError_1=__importDefault(require("./AbolishError"));const ObjectModifier_1=__importDefault(require("./ObjectModifier"));const lodash_clonedeep_1=__importDefault(require("lodash.clonedeep"));class Abolish{constructor(){this.validators={};this.config={useStartCaseInErrors:true}}static addGlobalValidator(validator){if(typeof validator==="object"&&!Array.isArray(validator)){if(!validator.error)validator.error=`:param failed {${validator.name}} validation.`;GlobalValidators_1.default[validator.name]=validator}else{throw new TypeError("addGlobalValidator argument must be an object.")}return this}static addGlobalValidators(validators){if(typeof validators==="object"){validators=Object.values(validators)}if(Array.isArray(validators)){for(const value of validators){Abolish.addGlobalValidator(value)}}else{throw new TypeError("addGlobalValidators argument must be an array or an object")}return this}useStartCaseInErrors(value=true){this.config.useStartCaseInErrors=value;return this}addValidator(validator){if(typeof validator==="object"&&!Array.isArray(validator)){if(!validator.error)validator.error=`:param failed {${validator.name}} validation.`;this.validators[validator.name]=validator}else{throw new TypeError("addValidator argument must be an object.")}return this}addValidators(validators){if(typeof validators==="object"){validators=Object.values(validators)}if(Array.isArray(validators)){for(const value of validators){this.addValidator(value)}}else{throw new TypeError("addValidators argument must be an array or an object")}return this}static validate(object,rules){return(new this).validate(object,rules)}static validateAsync(object,rules){return(new this).validateAsync(object,rules)}validate(object,rules,isAsync=false){let asyncData={validated:{},jobs:[],keysToBeValidated:[],includeKeys:[]};rules=(0,lodash_clonedeep_1.default)(rules);let internalWildcardRules={};if(rules.hasOwnProperty("*")||rules.hasOwnProperty("$")){internalWildcardRules=rules["*"]||rules["$"];delete rules["*"];delete rules["$"];if(typeof internalWildcardRules==="string")internalWildcardRules=(0,StringToRules_1.default)(internalWildcardRules)}let validated={...object};let includeKeys=[];if(rules.hasOwnProperty("$include")){includeKeys=rules["$include"];if(!Array.isArray(includeKeys))throw new Error(`$include has to be an array!`);delete rules["$include"]}let keysToBeValidated=Object.keys(rules);for(const rule of keysToBeValidated){let ruleData=rules[rule];if(["*","$"].includes(ruleData))ruleData={};if(typeof ruleData==="string"){ruleData=(0,StringToRules_1.default)(ruleData)}else if(Array.isArray(ruleData)){ruleData=(0,Functions_1.Rule)(ruleData)}let $skip=false;if(ruleData.hasOwnProperty("$skip")){$skip=ruleData["$skip"];delete ruleData["$skip"];if(typeof $skip==="function"){$skip=$skip(validated[rule])}if(typeof $skip!=="boolean"){throw new Error(`$skip value or resolved function value must be a BOOLEAN in RuleFor: (${rule})`)}}if($skip){keysToBeValidated=keysToBeValidated.filter((v=>v!==rule))}else{let $name=false;if(ruleData.hasOwnProperty("$name")){$name=ruleData["$name"];delete ruleData["$name"];if(typeof $name!=="string"){throw new Error(`$name must be a string in RuleFor: (${rule})`)}}let $error;if(ruleData.hasOwnProperty("$error")){$error=ruleData["$error"];delete ruleData["$error"];if(!$error||typeof $error!=="string"){throw new Error(`$error value must be a STRING in RuleFor: (${rule})`)}}let $errors;if(ruleData.hasOwnProperty("$errors")){$errors=ruleData["$errors"];delete ruleData["$errors"];if(!$errors||typeof $errors!=="object"){throw new Error(`$errors value must be an OBJECT in RuleFor: (${rule})`)}}ruleData={...internalWildcardRules,...ruleData};for(const validatorName of Object.keys(ruleData)){if(!this.validators.hasOwnProperty(validatorName)&&!GlobalValidators_1.default.hasOwnProperty(validatorName)){throw new Error(`Validator: {${validatorName}} does not exists but defined in rules`)}const validator=this.validators[validatorName]||GlobalValidators_1.default[validatorName];if(!isAsync&&validator.isAsync){throw new Error(`Validator: {${validatorName}} is async, use validateAsync method instead.`)}const validatorOption=ruleData[validatorName];const objectValue=(0,Functions_1.abolish_Get)(validated,rule);if(isAsync){asyncData.jobs.push({$name:$name,rule:rule,validator:validator,validatorName:validatorName,validatorOption:validatorOption,$error:$error,$errors:$errors})}else{let validationResult=false;try{validationResult=validator.validator(objectValue,validatorOption,{error:(message,data)=>new AbolishError_1.default(message,data),modifier:new ObjectModifier_1.default(validated,rule,$name)})}catch(e){return[{key:rule,type:"internal",validator:validatorName,message:e.message,data:e.stack},{}]}if(validationResult===false||validationResult instanceof AbolishError_1.default){let message;let data=null;if(validationResult instanceof AbolishError_1.default){message=validationResult.message;data=validationResult.data}message=$error||message;if($errors&&$errors[validatorName])message=$errors[validatorName];const optionIsStringable=typeof validatorOption==="string"||typeof validatorOption==="number"||Array.isArray(validatorOption);message=(message||validator.error).replace(":param",$name?$name:(0,Functions_1.abolish_StartCase)(rule,this));if(optionIsStringable)message=message.replace(":option",String(validatorOption));return[{key:rule,type:"validator",validator:validatorName,message:message,data:data},{}]}}}}}if(isAsync){asyncData.validated=validated;asyncData.keysToBeValidated=keysToBeValidated;asyncData.includeKeys=includeKeys;return asyncData}validated=(0,Functions_1.abolish_Pick)(validated,keysToBeValidated.concat(includeKeys));return[false,validated]}validateAsync(object,rules){const asyncData=this.validate(object,rules,true);const{validated:validated,jobs:jobs,keysToBeValidated:keysToBeValidated,includeKeys:includeKeys}=asyncData;return new Promise((async resolve=>{for(const job of jobs){const{$name:$name,rule:rule,validator:validator,validatorName:validatorName,validatorOption:validatorOption,$error:$error,$errors:$errors}=job;const objectValue=(0,Functions_1.abolish_Get)(validated,rule);let validationResult=false;try{validationResult=await validator.validator(objectValue,validatorOption,{error:(message,data)=>new AbolishError_1.default(message,data),modifier:new ObjectModifier_1.default(validated,rule,$name)})}catch(e){return resolve([{key:rule,type:"internal",validator:validatorName,message:e.message,data:e.stack},{}])}if(validationResult===false||validationResult instanceof AbolishError_1.default){let message;let data=null;if(validationResult instanceof AbolishError_1.default){message=validationResult.message;data=validationResult.data}message=$error||message;if($errors&&$errors[validatorName])message=$errors[validatorName];message=(message||validator.error).replace(":param",$name?$name:(0,Functions_1.abolish_StartCase)(rule,this));const optionIsStringable=typeof validatorOption==="string"||typeof validatorOption==="number";if(optionIsStringable)message=message.replace(":option",String(validatorOption));return resolve([{key:rule,type:"validator",validator:validatorName,message:message,data:data},{}])}}return resolve([false,(0,Functions_1.abolish_Pick)(validated,keysToBeValidated.concat(includeKeys))])}))}static useJoi(joi){if(!joi){try{joi=require("joi")}catch(e){throw new Error(`Joi not found! Install Joi`)}}return this.addGlobalValidator({name:"$joi",validator(value,joiSchema,{error:error,modifier:modifier}){if(!joi.isSchema(joiSchema)){return error(`Invalid JOI schema provided for :param`)}let validated;try{validated=joi.attempt(value,joiSchema)}catch(e){return error(e.message)}modifier.setThis(validated);return true}})}check(variable,rules){const[e,v]=this.validate({variable:variable},{variable:rules});return[e,v===null||v===void 0?void 0:v.variable]}static check(variable,rules){return(new this).check(variable,rules)}async checkAsync(variable,rules){const[e,v]=await this.validateAsync({variable:variable},{variable:rules});return[e,v===null||v===void 0?void 0:v.variable]}static checkAsync(variable,rules){return(new this).checkAsync(variable,rules)}attempt(variable,rules){const[e,v]=this.validate({variable:variable},{variable:rules});if(e)throw new Error(e.message);return v.variable}static attempt(variable,rules,abolish){return(new this).attempt(variable,rules)}async attemptAsync(variable,rules){const[e,v]=await this.validateAsync({variable:variable},{variable:rules});if(e)throw new Error(e.message);return v.variable}static async attemptAsync(variable,rules){return(new this).attemptAsync(variable,rules)}}module.exports=Abolish},{"./AbolishError":4,"./Functions":5,"./GlobalValidators":6,"./ObjectModifier":7,"./StringToRules":8,joi:"joi","lodash.clonedeep":9}],4:[function(require,module,exports){"use strict";class AbolishError{constructor(message,data){this.message=message;if(data){this.data=data}else{this.data={}}return this}setData(data){this.data=data;return data}}module.exports=AbolishError},{}],5:[function(require,module,exports){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};Object.defineProperty(exports,"__esModule",{value:true});exports.skipIfNotDefined=exports.skipIfUndefined=exports.$inline=exports.ParseRules=exports.abolish_Get=exports.abolish_Set=exports.abolish_Pick=exports.Rule=exports.abolish_StartCase=exports.abolish_UpperFirst=void 0;const StringToRules_1=__importDefault(require("./StringToRules"));const lodash_startcase_1=__importDefault(require("lodash.startcase"));function abolish_UpperFirst(str){return str[0].toUpperCase()+str.substr(1)}exports.abolish_UpperFirst=abolish_UpperFirst;function abolish_StartCase(str,abolishInstance){return abolishInstance?abolishInstance.config.useStartCaseInErrors?(0,lodash_startcase_1.default)(str):str:(0,lodash_startcase_1.default)(str)}exports.abolish_StartCase=abolish_StartCase;function Rule(rules){if(!Array.isArray(rules)){rules=[rules]}let generatedRule={};for(let rule of rules){if(typeof rule==="string")rule=(0,StringToRules_1.default)(rule);generatedRule={...generatedRule,...rule}}return generatedRule}exports.Rule=Rule;function abolish_Pick(object,keys){return keys.reduce(((obj,key)=>{if(object&&object.hasOwnProperty(key)){obj[key]=object[key]}return obj}),{})}exports.abolish_Pick=abolish_Pick;function abolish_Set(object,path,value){if(Object(object)!==object)return object;if(!Array.isArray(path))path=path.toString().match(/[^.[\]]+/g)||[];path.slice(0,-1).reduce(((a,c,i)=>Object(a[c])===a[c]?a[c]:a[c]=Math.abs(path[i+1])>>0===+path[i+1]?[]:{}),object)[path[path.length-1]]=value;return object}exports.abolish_Set=abolish_Set;function abolish_Get(obj,path,defaultValue){if(path.indexOf(".")>=0){const travel=regexp=>String.prototype.split.call(path,regexp).filter(Boolean).reduce(((res,key)=>res!==null&&res!==undefined?res[key]:res),obj);const result=travel(/[,[\]]+?/)||travel(/[,[\].]+?/);return result===undefined||result===obj?defaultValue:result}else{return obj[path]}}exports.abolish_Get=abolish_Get;function ParseRules(rules){let generatedRule={};for(let key of Object.keys(rules)){let rule=rules[key];if(key==="$include"){generatedRule[key]=rule}else{if(typeof rule==="string"){rule=(0,StringToRules_1.default)(rule)}else if(Array.isArray(rule)){rule=Rule(rule)}generatedRule[key]=rule}}return generatedRule}exports.ParseRules=ParseRules;const $inline=(fn,$error)=>$error?{$inline:fn,$error:$error}:{$inline:fn};exports.$inline=$inline;function skipIfUndefined(rule){if(!Array.isArray(rule))rule=[rule];return[{$skip:v=>v===undefined}].concat(rule)}exports.skipIfUndefined=skipIfUndefined;function skipIfNotDefined(rule){if(!Array.isArray(rule))rule=[rule];return[{$skip:v=>v===undefined||v===null}].concat(rule)}exports.skipIfNotDefined=skipIfNotDefined},{"./StringToRules":8,"lodash.startcase":11}],6:[function(require,module,exports){"use strict";function trimIfString(value){return typeof value==="string"?value.trim():value}const GlobalValidators={must:{name:"must",error:":param is required.",validator:(value,option)=>{if(!option){return true}if(typeof value==="undefined"||value===null){return false}else if(typeof value==="string"||Array.isArray(value)){return value.length>0}return true}},typeof:{name:"typeof",error:":param is not typeOf :option",validator:(value,option)=>{if(option===false)return true;option=option.toLowerCase();if(option==="array")return Array.isArray(value);return typeof value===option}},exact:{name:"exact",validator:(value,option)=>value===option,error:":param failed exact validator"},min:{name:"min",error:":param is too small. (Min. :option)",validator:(value,option,helpers)=>{const isNotNumber=isNaN(value);if(typeof value==="string"&&isNotNumber||Array.isArray(value))return GlobalValidators.minLength.validator(value,option,helpers);if(isNotNumber)return false;return Number(value)>=Number(option)}},max:{name:"max",error:":param is too big. (Max. :option)",validator:(value,option,helpers)=>{const isNotNumber=isNaN(value);if(typeof value==="string"&&isNotNumber||Array.isArray(value))return GlobalValidators.maxLength.validator(value,option,helpers);if(isNotNumber)return false;return Number(value)<=Number(option)}},minLength:{name:"minLength",error:":param is too short. (Min. :option characters)",validator:(value,option)=>{if(typeof value!=="string"&&!Array.isArray(value))return false;value=trimIfString(value);return value.length>=Number(option)}},maxLength:{name:"maxLength",error:":param is too long. (Max. :option characters)",validator:(value,option)=>{if(typeof value!=="string"&&!Array.isArray(value))return false;value=trimIfString(value);return value.length<=Number(option)}},selectMin:{name:"selectMin",error:"Select at-least :option :param.",validator:(value,option,helpers)=>GlobalValidators.minLength.validator(value,option,helpers)},selectMax:{name:"selectMax",error:"Select at-most :option :param.",validator:(value,option,helpers)=>GlobalValidators.maxLength.validator(value,option,helpers)},$inline:{name:"$inline",error:":param failed inline validation.",validator:(v,o,helpers)=>o(v,helpers)}};GlobalValidators.required=Object.assign({},GlobalValidators.must);GlobalValidators.required.name="required";module.exports=GlobalValidators},{}],7:[function(require,module,exports){"use strict";var __importDefault=this&&this.__importDefault||function(mod){return mod&&mod.__esModule?mod:{default:mod}};const Functions_1=require("./Functions");const lodash_has_1=__importDefault(require("lodash.has"));const lodash_unset_1=__importDefault(require("lodash.unset"));class ObjectModifier{constructor(data,param,name){this.data=data;this.path=param;this.name=name;return this}get(path,$default=undefined){return(0,Functions_1.abolish_Get)(this.data,path,$default)}getThis(){return this.get(this.path)}has(path){return(0,lodash_has_1.default)(this.data,path)}set(path,value){return(0,Functions_1.abolish_Set)(this.data,path,value)}setThis(value){return this.set(this.path,value)}unset(path){return(0,lodash_unset_1.default)(this.data,path)}unsetThis(){return(0,lodash_unset_1.default)(this.data,this.path)}getName(){return this.name||(0,Functions_1.abolish_StartCase)(this.path)}}module.exports=ObjectModifier},{"./Functions":5,"lodash.has":10,"lodash.unset":12}],8:[function(require,module,exports){"use strict";const onlyKey=new RegExp(/([!a-zA-Z_*0-9]+)/g);const keyColumnVal=new RegExp(/([a-zA-Z_*0-9]+:[a-zA-Z_0-9]+)/g);const keyColumnValStringDoubleQuotes=new RegExp(/([a-zA-Z_*0-9]+:"[^"]+")/g);const keyColumnValStringSingleQuotes=new RegExp(/([a-zA-Z_*0-9]+:'[^']+')/g);const keyColumnValStringGraveAccent=new RegExp(/([a-zA-Z_*0-9]+:`[^`]+`)/g);const StringToRules=str=>{let s=str.split("|");const keyColumnValObj={};for(let i=0;i<s.length;i++){const pair=s[i];if(pair.match(keyColumnValStringSingleQuotes)||pair.match(keyColumnValStringDoubleQuotes)||pair.match(keyColumnValStringGraveAccent)){const[key,...value]=pair.split(":");let valueToString=value.join(":");valueToString=valueToString.substr(1);valueToString=valueToString.substr(0,value.length-1);keyColumnValObj[key]=valueToString}else if(pair.match(keyColumnVal)){let[key,value]=pair.split(":");if(!isNaN(value)){value=Number(value)}keyColumnValObj[key]=value}else if(pair.match(onlyKey)){let key=pair;let value=true;if(key.substr(0,1)==="!"){key=key.substr(1);value=false}keyColumnValObj[key]=value}}return keyColumnValObj};module.exports=StringToRules},{}],9:[function(require,module,exports){(function(global){(function(){var LARGE_ARRAY_SIZE=200;var HASH_UNDEFINED="__lodash_hash_undefined__";var MAX_SAFE_INTEGER=9007199254740991;var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",promiseTag="[object Promise]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reFlags=/\w*$/;var reIsHostCtor=/^\[object .+?Constructor\]$/;var reIsUint=/^(?:0|[1-9]\d*)$/;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports;var freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports;function addMapEntry(map,pair){map.set(pair[0],pair[1]);return map}function addSetEntry(set,value){set.add(value);return set}function arrayEach(array,iteratee){var index=-1,length=array?array.length:0;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index]}return array}function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array?array.length:0;if(initAccum&&length){accumulator=array[++index]}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array)}return accumulator}function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index)}return result}function getValue(object,key){return object==null?undefined:object[key]}function isHostObject(value){var result=false;if(value!=null&&typeof value.toString!="function"){try{result=!!(value+"")}catch(e){}}return result}function mapToArray(map){var index=-1,result=Array(map.size);map.forEach((function(value,key){result[++index]=[key,value]}));return result}function overArg(func,transform){return function(arg){return func(transform(arg))}}function setToArray(set){var index=-1,result=Array(set.size);set.forEach((function(value){result[++index]=value}));return result}var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();var funcToString=funcProto.toString;var hasOwnProperty=objectProto.hasOwnProperty;var objectToString=objectProto.toString;var reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Buffer=moduleExports?root.Buffer:undefined,Symbol=root.Symbol,Uint8Array=root.Uint8Array,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice;var nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeKeys=overArg(Object.keys,Object);var DataView=getNative(root,"DataView"),Map=getNative(root,"Map"),Promise=getNative(root,"Promise"),Set=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),nativeCreate=getNative(Object,"create");var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);var symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined;function Hash(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(key){return this.has(key)&&delete this.__data__[key]}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}return true}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){return getMapData(this,key)["delete"](key)}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){getMapData(this,key).set(key,value);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function Stack(entries){this.__data__=new ListCache(entries)}function stackClear(){this.__data__=new ListCache}function stackDelete(key){return this.__data__["delete"](key)}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}function stackSet(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);return this}cache=this.__data__=new MapCache(pairs)}cache.set(key,value);return this}Stack.prototype.clear=stackClear;Stack.prototype["delete"]=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;function arrayLikeKeys(value,inherited){var result=isArray(value)||isArguments(value)?baseTimes(value.length,String):[];var length=result.length,skipIndexes=!!length;for(var key in value){if((inherited||hasOwnProperty.call(value,key))&&!(skipIndexes&&(key=="length"||isIndex(key,length)))){result.push(key)}}return result}function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined&&!(key in object)){object[key]=value}}function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}function baseAssign(object,source){return object&©Object(source,keys(source),object)}function baseClone(value,isDeep,isFull,customizer,key,object,stack){var result;if(customizer){result=object?customizer(value,key,object,stack):customizer(value)}if(result!==undefined){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result)}}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep)}if(tag==objectTag||tag==argsTag||isFunc&&!object){if(isHostObject(value)){return object?value:{}}result=initCloneObject(isFunc?{}:value);if(!isDeep){return copySymbols(value,baseAssign(result,value))}}else{if(!cloneableTags[tag]){return object?value:{}}result=initCloneByTag(value,tag,baseClone,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked){return stacked}stack.set(value,result);if(!isArr){var props=isFull?getAllKeys(value):keys(value)}arrayEach(props||value,(function(subValue,key){if(props){key=subValue;subValue=value[key]}assignValue(result,key,baseClone(subValue,isDeep,isFull,customizer,key,value,stack))}));return result}function baseCreate(proto){return isObject(proto)?objectCreate(proto):{}}function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}function baseGetTag(value){return objectToString.call(value)}function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object)}var result=[];for(var key in Object(object)){if(hasOwnProperty.call(object,key)&&key!="constructor"){result.push(key)}}return result}function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice()}var result=new buffer.constructor(buffer.length);buffer.copy(result);return result}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result}function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}function cloneMap(map,isDeep,cloneFunc){var array=isDeep?cloneFunc(mapToArray(map),true):mapToArray(map);return arrayReduce(array,addMapEntry,new map.constructor)}function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result}function cloneSet(set,isDeep,cloneFunc){var array=isDeep?cloneFunc(setToArray(set),true):setToArray(set);return arrayReduce(array,addSetEntry,new set.constructor)}function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}function copyObject(source,props,object,customizer){object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;assignValue(object,key,newValue===undefined?source[key]:newValue)}return object}function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}var getSymbols=nativeGetSymbols?overArg(nativeGetSymbols,Object):stubArray;var getTag=baseGetTag;if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag){getTag=function(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):undefined;if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}}return result}}function initCloneArray(array){var length=array.length,result=array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty.call(array,"index")){result.index=array.index;result.input=array.input}return result}function initCloneObject(object){return typeof object.constructor=="function"&&!isPrototype(object)?baseCreate(getPrototype(object)):{}}function initCloneByTag(object,tag,cloneFunc,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return cloneMap(object,isDeep,cloneFunc);case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return cloneSet(object,isDeep,cloneFunc);case symbolTag:return cloneSymbol(object)}}function isIndex(value,length){length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(typeof value=="number"||reIsUint.test(value))&&(value>-1&&value%1==0&&value<length)}function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=="function"&&Ctor.prototype||objectProto;return value===proto}function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function cloneDeep(value){return baseClone(value,true,true)}function eq(value,other){return value===other||value!==value&&other!==other}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}var isArray=Array.isArray;function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}var isBuffer=nativeIsBuffer||stubFalse;function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isObjectLike(value){return!!value&&typeof value=="object"}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function stubArray(){return[]}function stubFalse(){return false}module.exports=cloneDeep}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],10:[function(require,module,exports){(function(global){(function(){var FUNC_ERROR_TEXT="Expected a function";var HASH_UNDEFINED="__lodash_hash_undefined__";var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991;var argsTag="[object Arguments]",funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]";var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reEscapeChar=/\\(\\)?/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var reIsUint=/^(?:0|[1-9]\d*)$/;var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();function getValue(object,key){return object==null?undefined:object[key]}function isHostObject(value){var result=false;if(value!=null&&typeof value.toString!="function"){try{result=!!(value+"")}catch(e){}}return result}var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();var funcToString=funcProto.toString;var hasOwnProperty=objectProto.hasOwnProperty;var objectToString=objectProto.toString;var reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Symbol=root.Symbol,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice;var Map=getNative(root,"Map"),nativeCreate=getNative(Object,"create");var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function Hash(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(key){return this.has(key)&&delete this.__data__[key]}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}return true}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){return getMapData(this,key)["delete"](key)}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){getMapData(this,key).set(key,value);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}function baseHas(object,key){return object!=null&&hasOwnProperty.call(object,key)}function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseToString(value){if(typeof value=="string"){return value}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function castPath(value){return isArray(value)?value:stringToPath(value)}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}function hasPath(object,path,hasFunc){path=isKey(path,object)?[path]:castPath(path);var result,index=-1,length=path.length;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break}object=object[key]}if(result){return result}var length=object?object.length:0;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function isIndex(value,length){length=length==null?MAX_SAFE_INTEGER:length;return!!length&&(typeof value=="number"||reIsUint.test(value))&&(value>-1&&value%1==0&&value<length)}function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}var stringToPath=memoize((function(string){string=toString(string);var result=[];if(reLeadingDot.test(string)){result.push("")}string.replace(rePropName,(function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}));return result}));function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function memoize(func,resolver){if(typeof func!="function"||resolver&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result);return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;function eq(value,other){return value===other||value!==value&&other!==other}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}var isArray=Array.isArray;function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isObjectLike(value){return!!value&&typeof value=="object"}function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return value==null?"":baseToString(value)}function has(object,path){return object!=null&&hasPath(object,path,baseHas)}module.exports=has}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],11:[function(require,module,exports){(function(global){(function(){var INFINITY=1/0;var symbolTag="[object Symbol]";var reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f\\ufe20-\\ufe23",rsComboSymbolsRange="\\u20d0-\\u20f0",rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange;var rsApos="['’]",rsAstral="["+rsAstralRange+"]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboMarksRange+rsComboSymbolsRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d";var rsLowerMisc="(?:"+rsLower+"|"+rsMisc+")",rsUpperMisc="(?:"+rsUpper+"|"+rsMisc+")",rsOptLowerContr="(?:"+rsApos+"(?:d|ll|m|re|s|t|ve))?",rsOptUpperContr="(?:"+rsApos+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")";var reApos=RegExp(rsApos,"g");var reComboMark=RegExp(rsCombo,"g");var reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");var reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptLowerContr+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsUpperMisc+"+"+rsOptUpperContr+"(?="+[rsBreak,rsUpper+rsLowerMisc,"$"].join("|")+")",rsUpper+"?"+rsLowerMisc+"+"+rsOptLowerContr,rsUpper+"+"+rsOptUpperContr,rsDigits,rsEmoji].join("|"),"g");var reHasUnicode=RegExp("["+rsZWJ+rsAstralRange+rsComboMarksRange+rsComboSymbolsRange+rsVarRange+"]");var reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"};var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array?array.length:0;if(initAccum&&length){accumulator=array[++index]}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array)}return accumulator}function asciiToArray(string){return string.split("")}function asciiWords(string){return string.match(reAsciiWord)||[]}function basePropertyOf(object){return function(key){return object==null?undefined:object[key]}}var deburrLetter=basePropertyOf(deburredLetters);function hasUnicode(string){return reHasUnicode.test(string)}function hasUnicodeWord(string){return reHasUnicodeWord.test(string)}function stringToArray(string){return hasUnicode(string)?unicodeToArray(string):asciiToArray(string)}function unicodeToArray(string){return string.match(reUnicode)||[]}function unicodeWords(string){return string.match(reUnicodeWord)||[]}var objectProto=Object.prototype;var objectToString=objectProto.toString;var Symbol=root.Symbol;var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function baseSlice(array,start,end){var index=-1,length=array.length;if(start<0){start=-start>length?0:length+start}end=end>length?length:end;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start]}return result}function baseToString(value){if(typeof value=="string"){return value}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function castSlice(array,start,end){var length=array.length;end=end===undefined?length:end;return!start&&end>=length?array:baseSlice(array,start,end)}function createCaseFirst(methodName){return function(string){string=toString(string);var strSymbols=hasUnicode(string)?stringToArray(string):undefined;var chr=strSymbols?strSymbols[0]:string.charAt(0);var trailing=strSymbols?castSlice(strSymbols,1).join(""):string.slice(1);return chr[methodName]()+trailing}}function createCompounder(callback){return function(string){return arrayReduce(words(deburr(string).replace(reApos,"")),callback,"")}}function isObjectLike(value){return!!value&&typeof value=="object"}function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return value==null?"":baseToString(value)}function deburr(string){string=toString(string);return string&&string.replace(reLatin,deburrLetter).replace(reComboMark,"")}var startCase=createCompounder((function(result,word,index){return result+(index?" ":"")+upperFirst(word)}));var upperFirst=createCaseFirst("toUpperCase");function words(string,pattern,guard){string=toString(string);pattern=guard?undefined:pattern;if(pattern===undefined){return hasUnicodeWord(string)?unicodeWords(string):asciiWords(string)}return string.match(pattern)||[]}module.exports=startCase}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],12:[function(require,module,exports){(function(global){(function(){var FUNC_ERROR_TEXT="Expected a function";var HASH_UNDEFINED="__lodash_hash_undefined__";var INFINITY=1/0;var funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]";var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var reRegExpChar=/[\\^$.*+?()[\]{}|]/g;var reEscapeChar=/\\(\\)?/g;var reIsHostCtor=/^\[object .+?Constructor\]$/;var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global;var freeSelf=typeof self=="object"&&self&&self.Object===Object&&self;var root=freeGlobal||freeSelf||Function("return this")();function getValue(object,key){return object==null?undefined:object[key]}function isHostObject(value){var result=false;if(value!=null&&typeof value.toString!="function"){try{result=!!(value+"")}catch(e){}}return result}var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;var coreJsData=root["__core-js_shared__"];var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}();var funcToString=funcProto.toString;var hasOwnProperty=objectProto.hasOwnProperty;var objectToString=objectProto.toString;var reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Symbol=root.Symbol,splice=arrayProto.splice;var Map=getNative(root,"Map"),nativeCreate=getNative(Object,"create");var symbolProto=Symbol?Symbol.prototype:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function Hash(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(key){return this.has(key)&&delete this.__data__[key]}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value;return this}Hash.prototype.clear=hashClear;Hash.prototype["delete"]=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;function ListCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false}var lastIndex=data.length-1;if(index==lastIndex){data.pop()}else{splice.call(data,index,1)}return true}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){data.push([key,value])}else{data[index][1]=value}return this}ListCache.prototype.clear=listCacheClear;ListCache.prototype["delete"]=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;function MapCache(entries){var index=-1,length=entries?entries.length:0;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){return getMapData(this,key)["delete"](key)}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){getMapData(this,key).set(key,value);return this}MapCache.prototype.clear=mapCacheClear;MapCache.prototype["delete"]=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length}}return-1}function baseGet(object,path){path=isKey(path,object)?[path]:castPath(path);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])]}return index&&index==length?object:undefined}function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false}var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseSlice(array,start,end){var index=-1,length=array.length;if(start<0){start=-start>length?0:length+start}end=end>length?length:end;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start]}return result}function baseToString(value){if(typeof value=="string"){return value}if(isSymbol(value)){return symbolToString?symbolToString.call(value):""}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function baseUnset(object,path){path=isKey(path,object)?[path]:castPath(path);object=parent(object,path);var key=toKey(last(path));return!(object!=null&&hasOwnProperty.call(object,key))||delete object[key]}function castPath(value){return isArray(value)?value:stringToPath(value)}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=="string"?"string":"hash"]:data.map}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}function isKey(value,object){if(isArray(value)){return false}var type=typeof value;if(type=="number"||type=="symbol"||type=="boolean"||value==null||isSymbol(value)){return true}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object)}function isKeyable(value){var type=typeof value;return type=="string"||type=="number"||type=="symbol"||type=="boolean"?value!=="__proto__":value===null}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function parent(object,path){return path.length==1?object:baseGet(object,baseSlice(path,0,-1))}var stringToPath=memoize((function(string){string=toString(string);var result=[];if(reLeadingDot.test(string)){result.push("")}string.replace(rePropName,(function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}));return result}));function toKey(value){if(typeof value=="string"||isSymbol(value)){return value}var result=value+"";return result=="0"&&1/value==-INFINITY?"-0":result}function toSource(func){if(func!=null){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function memoize(func,resolver){if(typeof func!="function"||resolver&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);memoized.cache=cache.set(key,result);return result};memoized.cache=new(memoize.Cache||MapCache);return memoized}memoize.Cache=MapCache;function eq(value,other){return value===other||value!==value&&other!==other}var isArray=Array.isArray;function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isObject(value){var type=typeof value;return!!value&&(type=="object"||type=="function")}function isObjectLike(value){return!!value&&typeof value=="object"}function isSymbol(value){return typeof value=="symbol"||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return value==null?"":baseToString(value)}function unset(object,path){return object==null?true:baseUnset(object,path)}module.exports=unset}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1]); |
@@ -1,5 +0,6 @@ | ||
const {Abolish, Rule} = require('abolish'); | ||
const {Abolish, Rule, ParseRules} = require('abolish'); | ||
window.Abolish = Abolish; | ||
window.AbolishRule = Rule; | ||
window.AbolishParseRules = ParseRules; | ||
{ | ||
"name": "abolish-browser", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Browser version of abolish javascript validator", | ||
@@ -11,10 +11,11 @@ "main": "abolish.js", | ||
"scripts": { | ||
"build": "browserify index.js -o abolish.js", | ||
"build-min": "terser abolish.js --output='abolish.min.js'" | ||
"build": "npm run bundle && npm run minify", | ||
"bundle": "browserify --external joi index.js -o abolish.js", | ||
"minify": "terser abolish.js --output='abolish.min.js'" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"abolish": "^1.0.5", | ||
"abolish": "^4.5.3", | ||
"browserify": "^17.0.0", | ||
"terser": "^5.5.0" | ||
"terser": "^5.9.0" | ||
}, | ||
@@ -21,0 +22,0 @@ "keywords": [ |
@@ -12,2 +12,3 @@ ## Abolish for browser | ||
`Rule` is exposed as `window.AbolishRule` | ||
`ParseRules` is exposed as `window.AbolishParseRules` | ||
@@ -14,0 +15,0 @@ ```html |
Sorry, the diff of this file is too big to display
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
216293
5162
41
8