From 456d9155320b575476354c0cbe1a134d8a1b8605 Mon Sep 17 00:00:00 2001 From: Zbigniew Humeniuk Date: Tue, 18 Aug 2020 10:26:22 +0200 Subject: [PATCH] [ver] 0.2.1 --- dist/loco-core.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/loco-core.js b/dist/loco-core.js index 230584f..cf30446 100644 --- a/dist/loco-core.js +++ b/dist/loco-core.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.LocoCore=e():t.LocoCore=e()}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.r(e);var r=function(t){"function"==typeof t.constructor.initialize&&t.constructor.initialize(),"function"==typeof t.initialize&&t.initialize()},i=function(t,e,n){var r=void 0===n?t[e]:t[e][n];return"function"==typeof r?new r:"object"===o(r)?r:null},u=function(t){var e=document.getElementsByTagName("body")[0],n=e.getAttribute("data-namespace"),o=e.getAttribute("data-controller"),u=e.getAttribute("data-action"),l=i(t,n),c=i(t,o);return null!==l&&(c=i(t,n,o),l.controller=c,r(l)),null!==c&&(c.namespaceController=l,function(t,e){r(t),"function"==typeof t.constructor[e]&&t.constructor[e](),"function"==typeof t[e]&&t[e]()}(c,u)),{namespaceController:l,controller:c,action:u}},l={get params(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href,e={},n=/https?:\/\/.+\/\w+\/(\d+)/.exec(t),o=null!==n?n[1]:null;null!==o&&(e.id=parseInt(o));var r=t.split("?");if(1===r.length)return e;var i=r[r.length-1],u=i.split("&").map((function(t){return t.split("=")})),l=!0,c=!1,f=void 0;try{for(var a,p=u[Symbol.iterator]();!(l=(a=p.next()).done);l=!0){var y=a.value,d=decodeURIComponent(y[0]),s=decodeURIComponent(y[1]);"string"==typeof s&&(s=s.replace(/\+/g," ")),e[d]=s}}catch(t){c=!0,f=t}finally{try{l||null==p.return||p.return()}finally{if(c)throw f}}return e}()}};n.d(e,"init",(function(){return u})),n.d(e,"helpers",(function(){return l}))}])})); \ No newline at end of file +!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.LocoCore=n():t.LocoCore=n()}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}([function(t,n,e){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.r(n),e.d(n,"init",(function(){return u})),e.d(n,"helpers",(function(){return l}));var o=function(t){"function"==typeof t.constructor.initialize&&t.constructor.initialize(),"function"==typeof t.initialize&&t.initialize()},i=function(t,n,e){var o=void 0===e?t[n]:t[n][e];return"function"==typeof o?new o:"object"===r(o)?o:null},u=function(t){var n=document.getElementsByTagName("body")[0],e=n.getAttribute("data-namespace"),r=n.getAttribute("data-controller"),u=n.getAttribute("data-action"),c=i(t,e),f=i(t,r);return null!==c&&(f=i(t,e,r),c.controller=f,o(c)),null!==f&&(f.namespaceController=c,function(t,n){o(t),"function"==typeof t.constructor[n]&&t.constructor[n](),"function"==typeof t[n]&&t[n]()}(f,u)),{namespaceController:c,controller:f,action:u}};function c(t,n){var e;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("string"==typeof t)return f(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return f(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){e=t[Symbol.iterator]()},n:function(){var t=e.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==e.return||e.return()}finally{if(c)throw i}}}}function f(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e0&&void 0!==arguments[0]?arguments[0]:window.location.href,n={},e=/https?:\/\/.+\/\w+\/(\d+)/.exec(t),r=null!==e?e[1]:null;null!==r&&(n.id=parseInt(r));var o=t.split("?");if(1===o.length)return n;var i,u=o[o.length-1],f=u.split("&").map((function(t){return t.split("=")})),l=c(f);try{for(l.s();!(i=l.n()).done;){var a=i.value,p=decodeURIComponent(a[0]),y=decodeURIComponent(a[1]);"string"==typeof y&&(y=y.replace(/\+/g," ")),n[p]=y}}catch(t){l.e(t)}finally{l.f()}return n}()}}}])})); \ No newline at end of file diff --git a/package.json b/package.json index 9d71ba6..81a50a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "loco-js-core", - "version": "0.2.0", + "version": "0.2.1", "description": "Loco-JS-Core provides a logical structure for JavaScript code", "main": "dist/loco-core.js", "scripts": {