From a37579c06ac09cb9c6b5f1a8868ae99837d087ee Mon Sep 17 00:00:00 2001 From: Andros Fenollosa Date: Sat, 4 Jul 2020 16:34:03 +0200 Subject: [PATCH] Add message --- dist/ffnm.min.js | 2 +- src/core.js | 9 ++++++++- tsconfig.json | 9 --------- 3 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 tsconfig.json diff --git a/dist/ffnm.min.js b/dist/ffnm.min.js index 158f5ac..60bc9c0 100644 --- a/dist/ffnm.min.js +++ b/dist/ffnm.min.js @@ -1,2 +1,2 @@ -"use strict";function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,n){if(t){if("string"==typeof t)return _arrayLikeToArray(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(t,n):void 0}}function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r":sn(t,n)}function t(n,t){return x(function(t){return tn(t)+": "+u(n[t])},t.slice().sort())}switch(Object.prototype.toString.call(r)){case"[object Arguments]":return"(function() { return arguments; }("+x(u,r).join(", ")+"))";case"[object Array]":return"["+x(u,r).concat(t(r,fn(function(t){return/^\d+$/.test(t)},U(r)))).join(", ")+"]";case"[object Boolean]":return"object"==_typeof(r)?"new Boolean("+u(r.valueOf())+")":""+r;case"[object Date]":return"new Date("+(isNaN(r.valueOf())?u(NaN):tn(rn(r)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==_typeof(r)?"new Number("+u(r.valueOf())+")":1/r==-1/0?"-0":r.toString(10);case"[object String]":return"object"==_typeof(r)?"new String("+u(r.valueOf())+")":tn(r);case"[object Undefined]":return"undefined";default:if("function"==typeof r.toString){var n=""+r;if("[object Object]"!=n)return n}return"{"+t(r,U(r)).join(", ")+"}"}}var ln=o(function(t){return sn(t,[])}),pn=n(function(t,n){if(p(t)){if(p(n))return t.concat(n);throw new TypeError(ln(n)+" is not an array")}if(w(t)){if(w(n))return t+n;throw new TypeError(ln(n)+" is not a string")}if(null!=t&&yt(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&yt(t.concat))return t.concat(n);throw new TypeError(ln(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),hn=o(function(n){return f($(b,0,B(function(t){return t[0].length},n)),function(){for(var t=0;tt(n)?r:n}),le=$(r,0),pe=o(function(t){return le(t)/t.length}),he=o(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return pe(Array.prototype.slice.call(t,0).sort(function(t,n){return tt.length)&&(n=t.length);for(var r=0,e=new Array(n);r":sn(t,n)}function t(n,t){return x(function(t){return tn(t)+": "+u(n[t])},t.slice().sort())}switch(Object.prototype.toString.call(r)){case"[object Arguments]":return"(function() { return arguments; }("+x(u,r).join(", ")+"))";case"[object Array]":return"["+x(u,r).concat(t(r,fn(function(t){return/^\d+$/.test(t)},U(r)))).join(", ")+"]";case"[object Boolean]":return"object"==_typeof(r)?"new Boolean("+u(r.valueOf())+")":""+r;case"[object Date]":return"new Date("+(isNaN(r.valueOf())?u(NaN):tn(rn(r)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==_typeof(r)?"new Number("+u(r.valueOf())+")":1/r==-1/0?"-0":r.toString(10);case"[object String]":return"object"==_typeof(r)?"new String("+u(r.valueOf())+")":tn(r);case"[object Undefined]":return"undefined";default:if("function"==typeof r.toString){var n=""+r;if("[object Object]"!=n)return n}return"{"+t(r,U(r)).join(", ")+"}"}}var ln=o(function(t){return sn(t,[])}),pn=n(function(t,n){if(p(t)){if(p(n))return t.concat(n);throw new TypeError(ln(n)+" is not an array")}if(w(t)){if(w(n))return t+n;throw new TypeError(ln(n)+" is not a string")}if(null!=t&&yt(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&yt(t.concat))return t.concat(n);throw new TypeError(ln(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),hn=o(function(n){return f($(b,0,B(function(t){return t[0].length},n)),function(){for(var t=0;tt(n)?r:n}),le=$(r,0),pe=o(function(t){return le(t)/t.length}),he=o(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return pe(Array.prototype.slice.call(t,0).sort(function(t,n){return t { // Check KEY FUNCTION_TREE - return Object.keys(FUNCTION_TREE).map((key) => { + let checked = Object.keys(FUNCTION_TREE).map((key) => { // Check METHODS FUNCTION_TREE return FUNCTION_TREE[key].map((method) => { return RegExp(`^${key}:${method}\\('\\w+', *'[#,.,a-zA-Z]\\w*'\\)$`).test(element.getAttribute(event)); }).some(method => method); }).every(key => key); + // Notify error + if(!checked) { + console.error('FFNM: Bad syntax'); + console.error(element); + } + + return checked; }).every(item => item); }).every(event => event); } diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 7373e02..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "compilerOptions": { - "lib": [ - "es6", - "dom", - "dom.iterable" - ] - } -}