Comparing version 3.1.0 to 3.2.0
@@ -1,2 +0,2 @@ | ||
var e=function(e,r){for(;e;){if(e===r)return!0;e=e.parentNode}return!1},r=function(e,r,n){if(r){var t=document.createElement("a");t.classList.add(n.anchorLinkClassName),e.forEach(function(e){for(var o=e.id,a=0;a<r.length;a++){var i=r[a].hash;if(i.replace("#","")===o){var c=t.cloneNode(!1);c.setAttribute("href",i),c.textContent=n.anchorLinkSymbol,n.anchorLinkBefore?e.insertBefore(c,e.firstChild):e.appendChild(c)}}})}};exports.Mokuji=function(){function n(e,n){this.storeIds=[],this.options=Object.assign({anchorType:!0,anchorLink:!1,anchorLinkSymbol:"#",anchorLinkBefore:!0,anchorLinkClassName:"",anchorContainerTagName:"ol"},n);var t=function(e){return e.querySelectorAll("h1, h2, h3, h4, h5, h6")}(e),o=this.generateMokuji(t);if(this.options.anchorLink){var a=o.querySelectorAll("a");r(t,a,this.options)}return o}var t=n.prototype;return t.generateMokuji=function(e){var r=document.createElement(this.options.anchorContainerTagName);return this.generateHierarchyList(e,r),this.removeDuplicateIds(e,r),r},t.generateHierarchyList=function(r,n){for(var t=0,o=document.createElement("li"),a=document.createElement("a"),i=0;i<r.length;i++){var c=r[i],h=Number(c.tagName.substring(1));if(0!==t&&t<h){var s=document.createElement("ol");n.lastChild.appendChild(s),n=s}else if(0!==t&&t>h)for(var f=0;f<t-h;f++)e(n,n.parentNode)&&(n=n.parentNode.parentNode);var l=this.censorshipId(r,c.textContent),u=this.generateAnchorText(l,this.options.anchorType);c.id=u;var d=a.cloneNode(!1);d.href="#"+u,d.textContent=c.textContent;var p=o.cloneNode(!1);p.appendChild(d),n.appendChild(p),t=h}},t.censorshipId=function(e,r){for(var n=r||"",t=1;t<=e.length;){var o=1===t?n:n+"_"+t;if(-1===this.storeIds.indexOf(o)){this.storeIds.push(n=o);break}t++}return n},t.generateAnchorText=function(e,r){var n=function(e){return e.replace(/\s+/g,"_")}(e);return n=n.replace(/\&+/g,"").replace(/\&+/g,""),!0===r&&(n=function(e){return(e=encodeURIComponent(e)).replace(/\%+/g,".")}(n)),n},t.removeDuplicateIds=function(e,r){for(var n=r.getElementsByTagName("a"),t=function(r){var t=n[r].innerText,o=n[r].hash,a=Array.from(e).filter(function(e){return e.id===t});if(1===a.length)return"continue";var i=0;a.forEach(function(e){for(var r=e.id+"-"+i,t=0,a=Array.from(n);t<a.length;t++){var c=a[t];if(c.hash===o){c.href="#"+r;break}}e.id=r,i++})},o=0;o<n.length;o++)t(o)},n}(),exports.renderAnchorLink=r; | ||
var e=function(e,r){for(;e;){if(e===r)return!0;e=e.parentNode}return!1},r=function(e,r,n){if(r){var t=document.createElement("a");t.classList.add(n.anchorLinkClassName),e.forEach(function(e){for(var o=e.id,a=0;a<r.length;a++){var i=r[a].hash;if(i.replace("#","")===o){var c=t.cloneNode(!1);c.setAttribute("href",i),c.textContent=n.anchorLinkSymbol,n.anchorLinkBefore?e.insertBefore(c,e.firstChild):e.appendChild(c)}}})}};exports.Mokuji=/*#__PURE__*/function(){function n(e,n){this.options=void 0,this.storeIds=[],this.options=Object.assign({anchorType:!0,anchorLink:!1,anchorLinkSymbol:"#",anchorLinkBefore:!0,anchorLinkClassName:"",anchorContainerTagName:"ol"},n);var t=function(e){return e.querySelectorAll("h1, h2, h3, h4, h5, h6")}(e),o=this.generateMokuji(t);if(this.options.anchorLink){var a=o.querySelectorAll("a");r(t,a,this.options)}return o}var t=n.prototype;return t.generateMokuji=function(e){var r=document.createElement(this.options.anchorContainerTagName);return this.generateHierarchyList(e,r),this.removeDuplicateIds(e,r),r},t.generateHierarchyList=function(r,n){for(var t=0,o=document.createElement("li"),a=document.createElement("a"),i=0;i<r.length;i++){var c=r[i],h=Number(c.tagName.substring(1));if(0!==t&&t<h){var s=document.createElement("ol");n.lastChild.appendChild(s),n=s}else if(0!==t&&t>h)for(var f=0;f<t-h;f++)e(n,n.parentNode)&&(n=n.parentNode.parentNode);var l=this.censorshipId(r,c.textContent),u=this.generateAnchorText(l,this.options.anchorType);c.id=u;var d=a.cloneNode(!1);d.href="#"+u,d.textContent=c.textContent;var p=o.cloneNode(!1);p.appendChild(d),n.appendChild(p),t=h}},t.censorshipId=function(e,r){for(var n=r||"",t=1;t<=e.length;){var o=1===t?n:n+"_"+t;if(-1===this.storeIds.indexOf(o)){this.storeIds.push(n=o);break}t++}return n},t.generateAnchorText=function(e,r){var n=function(e){return e.replace(/\s+/g,"_")}(e);return n=n.replace(/\&+/g,"").replace(/\&+/g,""),!0===r&&(n=function(e){return(e=encodeURIComponent(e)).replace(/\%+/g,".")}(n)),n},t.removeDuplicateIds=function(e,r){for(var n=r.getElementsByTagName("a"),t=function(r){var t=n[r].innerText,o=n[r].hash,a=Array.from(e).filter(function(e){return e.id===t});if(1===a.length)return"continue";var i=0;a.forEach(function(e){for(var r=e.id+"-"+i,t=0,a=Array.from(n);t<a.length;t++){var c=a[t];if(c.hash===o){c.href="#"+r;break}}e.id=r,i++})},o=0;o<n.length;o++)t(o)},n}(),exports.renderAnchorLink=r; | ||
//# sourceMappingURL=mokuji.js.map |
@@ -1,2 +0,2 @@ | ||
const e=(e,t)=>{for(;e;){if(e===t)return!0;e=e.parentNode}return!1},t=(e,t,n)=>{if(!t)return;const o=document.createElement("a");o.classList.add(n.anchorLinkClassName),e.forEach(e=>{const{id:r}=e;for(let s=0;s<t.length;s++){const{hash:a}=t[s];if(a.replace("#","")!==r)continue;const i=o.cloneNode(!1);i.setAttribute("href",a),i.textContent=n.anchorLinkSymbol,n.anchorLinkBefore?e.insertBefore(i,e.firstChild):e.appendChild(i)}})};class n{constructor(e,n){this.storeIds=[],this.options=Object.assign({anchorType:!0,anchorLink:!1,anchorLinkSymbol:"#",anchorLinkBefore:!0,anchorLinkClassName:"",anchorContainerTagName:"ol"},n);const o=(e=>e.querySelectorAll("h1, h2, h3, h4, h5, h6"))(e),r=this.generateMokuji(o);if(this.options.anchorLink){const e=r.querySelectorAll("a");t(o,e,this.options)}return r}generateMokuji(e){let t=document.createElement(this.options.anchorContainerTagName);return this.generateHierarchyList(e,t),this.removeDuplicateIds(e,t),t}generateHierarchyList(t,n){let o=0;const r=document.createElement("li"),s=document.createElement("a");for(let a=0;a<t.length;a++){const i=t[a],c=Number(i.tagName.substring(1));if(0!==o&&o<c){const e=document.createElement("ol");n.lastChild.appendChild(e),n=e}else if(0!==o&&o>c)for(let t=0;t<o-c;t++)e(n,n.parentNode)&&(n=n.parentNode.parentNode);const h=this.censorshipId(t,i.textContent),l=this.generateAnchorText(h,this.options.anchorType);i.id=l;const d=s.cloneNode(!1);d.href=`#${l}`,d.textContent=i.textContent;const p=r.cloneNode(!1);p.appendChild(d),n.appendChild(p),o=c}}censorshipId(e,t){let n=t||"",o=1;for(;o<=e.length;){const e=1===o?n:`${n}_${o}`;if(-1===this.storeIds.indexOf(e)){n=e,this.storeIds.push(n);break}o++}return n}generateAnchorText(e,t){let n=(e=>e.replace(/\s+/g,"_"))(e);return n=n.replace(/\&+/g,"").replace(/\&+/g,""),!0===t&&(n=(e=>(e=encodeURIComponent(e)).replace(/\%+/g,"."))(n)),n}removeDuplicateIds(e,t){const n=t.getElementsByTagName("a");for(let t=0;t<n.length;t++){const o=n[t].innerText,r=n[t].hash,s=Array.from(e).filter(e=>e.id===o);if(1===s.length)continue;let a=0;s.forEach(e=>{const t=`${e.id}-${a}`;for(const e of Array.from(n))if(e.hash===r){e.href=`#${t}`;break}e.id=t,a++})}}}export{n as Mokuji,t as renderAnchorLink}; | ||
const e=(e,t)=>{for(;e;){if(e===t)return!0;e=e.parentNode}return!1},t=(e,t,n)=>{if(!t)return;const o=document.createElement("a");o.classList.add(n.anchorLinkClassName),e.forEach(e=>{const{id:r}=e;for(let s=0;s<t.length;s++){const{hash:a}=t[s];if(a.replace("#","")!==r)continue;const i=o.cloneNode(!1);i.setAttribute("href",a),i.textContent=n.anchorLinkSymbol,n.anchorLinkBefore?e.insertBefore(i,e.firstChild):e.appendChild(i)}})};class n{constructor(e,n){this.options=void 0,this.storeIds=[],this.options=Object.assign({anchorType:!0,anchorLink:!1,anchorLinkSymbol:"#",anchorLinkBefore:!0,anchorLinkClassName:"",anchorContainerTagName:"ol"},n);const o=(e=>e.querySelectorAll("h1, h2, h3, h4, h5, h6"))(e),r=this.generateMokuji(o);if(this.options.anchorLink){const e=r.querySelectorAll("a");t(o,e,this.options)}return r}generateMokuji(e){let t=document.createElement(this.options.anchorContainerTagName);return this.generateHierarchyList(e,t),this.removeDuplicateIds(e,t),t}generateHierarchyList(t,n){let o=0;const r=document.createElement("li"),s=document.createElement("a");for(let a=0;a<t.length;a++){const i=t[a],c=Number(i.tagName.substring(1));if(0!==o&&o<c){const e=document.createElement("ol");n.lastChild.appendChild(e),n=e}else if(0!==o&&o>c)for(let t=0;t<o-c;t++)e(n,n.parentNode)&&(n=n.parentNode.parentNode);const h=this.censorshipId(t,i.textContent),l=this.generateAnchorText(h,this.options.anchorType);i.id=l;const d=s.cloneNode(!1);d.href=`#${l}`,d.textContent=i.textContent;const p=r.cloneNode(!1);p.appendChild(d),n.appendChild(p),o=c}}censorshipId(e,t){let n=t||"",o=1;for(;o<=e.length;){const e=1===o?n:`${n}_${o}`;if(-1===this.storeIds.indexOf(e)){n=e,this.storeIds.push(n);break}o++}return n}generateAnchorText(e,t){let n=(e=>e.replace(/\s+/g,"_"))(e);return n=n.replace(/\&+/g,"").replace(/\&+/g,""),!0===t&&(n=(e=>(e=encodeURIComponent(e)).replace(/\%+/g,"."))(n)),n}removeDuplicateIds(e,t){const n=t.getElementsByTagName("a");for(let t=0;t<n.length;t++){const o=n[t].innerText,r=n[t].hash,s=Array.from(e).filter(e=>e.id===o);if(1===s.length)continue;let a=0;s.forEach(e=>{const t=`${e.id}-${a}`;for(const e of Array.from(n))if(e.hash===r){e.href=`#${t}`;break}e.id=t,a++})}}}export{n as Mokuji,t as renderAnchorLink}; | ||
//# sourceMappingURL=mokuji.modern.js.map |
@@ -1,2 +0,2 @@ | ||
var e=function(e,r){for(;e;){if(e===r)return!0;e=e.parentNode}return!1},r=function(e,r,n){if(r){var t=document.createElement("a");t.classList.add(n.anchorLinkClassName),e.forEach(function(e){for(var o=e.id,a=0;a<r.length;a++){var i=r[a].hash;if(i.replace("#","")===o){var c=t.cloneNode(!1);c.setAttribute("href",i),c.textContent=n.anchorLinkSymbol,n.anchorLinkBefore?e.insertBefore(c,e.firstChild):e.appendChild(c)}}})}},n=function(){function n(e,n){this.storeIds=[],this.options=Object.assign({anchorType:!0,anchorLink:!1,anchorLinkSymbol:"#",anchorLinkBefore:!0,anchorLinkClassName:"",anchorContainerTagName:"ol"},n);var t=function(e){return e.querySelectorAll("h1, h2, h3, h4, h5, h6")}(e),o=this.generateMokuji(t);if(this.options.anchorLink){var a=o.querySelectorAll("a");r(t,a,this.options)}return o}var t=n.prototype;return t.generateMokuji=function(e){var r=document.createElement(this.options.anchorContainerTagName);return this.generateHierarchyList(e,r),this.removeDuplicateIds(e,r),r},t.generateHierarchyList=function(r,n){for(var t=0,o=document.createElement("li"),a=document.createElement("a"),i=0;i<r.length;i++){var c=r[i],h=Number(c.tagName.substring(1));if(0!==t&&t<h){var s=document.createElement("ol");n.lastChild.appendChild(s),n=s}else if(0!==t&&t>h)for(var f=0;f<t-h;f++)e(n,n.parentNode)&&(n=n.parentNode.parentNode);var l=this.censorshipId(r,c.textContent),u=this.generateAnchorText(l,this.options.anchorType);c.id=u;var d=a.cloneNode(!1);d.href="#"+u,d.textContent=c.textContent;var p=o.cloneNode(!1);p.appendChild(d),n.appendChild(p),t=h}},t.censorshipId=function(e,r){for(var n=r||"",t=1;t<=e.length;){var o=1===t?n:n+"_"+t;if(-1===this.storeIds.indexOf(o)){this.storeIds.push(n=o);break}t++}return n},t.generateAnchorText=function(e,r){var n=function(e){return e.replace(/\s+/g,"_")}(e);return n=n.replace(/\&+/g,"").replace(/\&+/g,""),!0===r&&(n=function(e){return(e=encodeURIComponent(e)).replace(/\%+/g,".")}(n)),n},t.removeDuplicateIds=function(e,r){for(var n=r.getElementsByTagName("a"),t=function(r){var t=n[r].innerText,o=n[r].hash,a=Array.from(e).filter(function(e){return e.id===t});if(1===a.length)return"continue";var i=0;a.forEach(function(e){for(var r=e.id+"-"+i,t=0,a=Array.from(n);t<a.length;t++){var c=a[t];if(c.hash===o){c.href="#"+r;break}}e.id=r,i++})},o=0;o<n.length;o++)t(o)},n}();export{n as Mokuji,r as renderAnchorLink}; | ||
var e=function(e,n){for(;e;){if(e===n)return!0;e=e.parentNode}return!1},n=function(e,n,r){if(n){var t=document.createElement("a");t.classList.add(r.anchorLinkClassName),e.forEach(function(e){for(var o=e.id,a=0;a<n.length;a++){var i=n[a].hash;if(i.replace("#","")===o){var c=t.cloneNode(!1);c.setAttribute("href",i),c.textContent=r.anchorLinkSymbol,r.anchorLinkBefore?e.insertBefore(c,e.firstChild):e.appendChild(c)}}})}},r=/*#__PURE__*/function(){function r(e,r){this.options=void 0,this.storeIds=[],this.options=Object.assign({anchorType:!0,anchorLink:!1,anchorLinkSymbol:"#",anchorLinkBefore:!0,anchorLinkClassName:"",anchorContainerTagName:"ol"},r);var t=function(e){return e.querySelectorAll("h1, h2, h3, h4, h5, h6")}(e),o=this.generateMokuji(t);if(this.options.anchorLink){var a=o.querySelectorAll("a");n(t,a,this.options)}return o}var t=r.prototype;return t.generateMokuji=function(e){var n=document.createElement(this.options.anchorContainerTagName);return this.generateHierarchyList(e,n),this.removeDuplicateIds(e,n),n},t.generateHierarchyList=function(n,r){for(var t=0,o=document.createElement("li"),a=document.createElement("a"),i=0;i<n.length;i++){var c=n[i],h=Number(c.tagName.substring(1));if(0!==t&&t<h){var s=document.createElement("ol");r.lastChild.appendChild(s),r=s}else if(0!==t&&t>h)for(var f=0;f<t-h;f++)e(r,r.parentNode)&&(r=r.parentNode.parentNode);var l=this.censorshipId(n,c.textContent),u=this.generateAnchorText(l,this.options.anchorType);c.id=u;var d=a.cloneNode(!1);d.href="#"+u,d.textContent=c.textContent;var p=o.cloneNode(!1);p.appendChild(d),r.appendChild(p),t=h}},t.censorshipId=function(e,n){for(var r=n||"",t=1;t<=e.length;){var o=1===t?r:r+"_"+t;if(-1===this.storeIds.indexOf(o)){this.storeIds.push(r=o);break}t++}return r},t.generateAnchorText=function(e,n){var r=function(e){return e.replace(/\s+/g,"_")}(e);return r=r.replace(/\&+/g,"").replace(/\&+/g,""),!0===n&&(r=function(e){return(e=encodeURIComponent(e)).replace(/\%+/g,".")}(r)),r},t.removeDuplicateIds=function(e,n){for(var r=n.getElementsByTagName("a"),t=function(n){var t=r[n].innerText,o=r[n].hash,a=Array.from(e).filter(function(e){return e.id===t});if(1===a.length)return"continue";var i=0;a.forEach(function(e){for(var n=e.id+"-"+i,t=0,a=Array.from(r);t<a.length;t++){var c=a[t];if(c.hash===o){c.href="#"+n;break}}e.id=n,i++})},o=0;o<r.length;o++)t(o)},r}();export{r as Mokuji,n as renderAnchorLink}; | ||
//# sourceMappingURL=mokuji.module.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e||self).mokujiJs={})}(this,function(e){var n=function(e,n){for(;e;){if(e===n)return!0;e=e.parentNode}return!1},t=function(e,n,t){if(n){var r=document.createElement("a");r.classList.add(t.anchorLinkClassName),e.forEach(function(e){for(var o=e.id,a=0;a<n.length;a++){var i=n[a].hash;if(i.replace("#","")===o){var c=r.cloneNode(!1);c.setAttribute("href",i),c.textContent=t.anchorLinkSymbol,t.anchorLinkBefore?e.insertBefore(c,e.firstChild):e.appendChild(c)}}})}};e.Mokuji=function(){function e(e,n){this.storeIds=[],this.options=Object.assign({anchorType:!0,anchorLink:!1,anchorLinkSymbol:"#",anchorLinkBefore:!0,anchorLinkClassName:"",anchorContainerTagName:"ol"},n);var r=function(e){return e.querySelectorAll("h1, h2, h3, h4, h5, h6")}(e),o=this.generateMokuji(r);if(this.options.anchorLink){var a=o.querySelectorAll("a");t(r,a,this.options)}return o}var r=e.prototype;return r.generateMokuji=function(e){var n=document.createElement(this.options.anchorContainerTagName);return this.generateHierarchyList(e,n),this.removeDuplicateIds(e,n),n},r.generateHierarchyList=function(e,t){for(var r=0,o=document.createElement("li"),a=document.createElement("a"),i=0;i<e.length;i++){var c=e[i],h=Number(c.tagName.substring(1));if(0!==r&&r<h){var s=document.createElement("ol");t.lastChild.appendChild(s),t=s}else if(0!==r&&r>h)for(var f=0;f<r-h;f++)n(t,t.parentNode)&&(t=t.parentNode.parentNode);var u=this.censorshipId(e,c.textContent),l=this.generateAnchorText(u,this.options.anchorType);c.id=l;var d=a.cloneNode(!1);d.href="#"+l,d.textContent=c.textContent;var p=o.cloneNode(!1);p.appendChild(d),t.appendChild(p),r=h}},r.censorshipId=function(e,n){for(var t=n||"",r=1;r<=e.length;){var o=1===r?t:t+"_"+r;if(-1===this.storeIds.indexOf(o)){this.storeIds.push(t=o);break}r++}return t},r.generateAnchorText=function(e,n){var t=function(e){return e.replace(/\s+/g,"_")}(e);return t=t.replace(/\&+/g,"").replace(/\&+/g,""),!0===n&&(t=function(e){return(e=encodeURIComponent(e)).replace(/\%+/g,".")}(t)),t},r.removeDuplicateIds=function(e,n){for(var t=n.getElementsByTagName("a"),r=function(n){var r=t[n].innerText,o=t[n].hash,a=Array.from(e).filter(function(e){return e.id===r});if(1===a.length)return"continue";var i=0;a.forEach(function(e){for(var n=e.id+"-"+i,r=0,a=Array.from(t);r<a.length;r++){var c=a[r];if(c.hash===o){c.href="#"+n;break}}e.id=n,i++})},o=0;o<t.length;o++)r(o)},e}(),e.renderAnchorLink=t}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e||self).mokujiJs={})}(this,function(e){var n=function(e,n){for(;e;){if(e===n)return!0;e=e.parentNode}return!1},t=function(e,n,t){if(n){var r=document.createElement("a");r.classList.add(t.anchorLinkClassName),e.forEach(function(e){for(var o=e.id,i=0;i<n.length;i++){var a=n[i].hash;if(a.replace("#","")===o){var c=r.cloneNode(!1);c.setAttribute("href",a),c.textContent=t.anchorLinkSymbol,t.anchorLinkBefore?e.insertBefore(c,e.firstChild):e.appendChild(c)}}})}};e.Mokuji=/*#__PURE__*/function(){function e(e,n){this.options=void 0,this.storeIds=[],this.options=Object.assign({anchorType:!0,anchorLink:!1,anchorLinkSymbol:"#",anchorLinkBefore:!0,anchorLinkClassName:"",anchorContainerTagName:"ol"},n);var r=function(e){return e.querySelectorAll("h1, h2, h3, h4, h5, h6")}(e),o=this.generateMokuji(r);if(this.options.anchorLink){var i=o.querySelectorAll("a");t(r,i,this.options)}return o}var r=e.prototype;return r.generateMokuji=function(e){var n=document.createElement(this.options.anchorContainerTagName);return this.generateHierarchyList(e,n),this.removeDuplicateIds(e,n),n},r.generateHierarchyList=function(e,t){for(var r=0,o=document.createElement("li"),i=document.createElement("a"),a=0;a<e.length;a++){var c=e[a],h=Number(c.tagName.substring(1));if(0!==r&&r<h){var s=document.createElement("ol");t.lastChild.appendChild(s),t=s}else if(0!==r&&r>h)for(var f=0;f<r-h;f++)n(t,t.parentNode)&&(t=t.parentNode.parentNode);var u=this.censorshipId(e,c.textContent),l=this.generateAnchorText(u,this.options.anchorType);c.id=l;var d=i.cloneNode(!1);d.href="#"+l,d.textContent=c.textContent;var p=o.cloneNode(!1);p.appendChild(d),t.appendChild(p),r=h}},r.censorshipId=function(e,n){for(var t=n||"",r=1;r<=e.length;){var o=1===r?t:t+"_"+r;if(-1===this.storeIds.indexOf(o)){this.storeIds.push(t=o);break}r++}return t},r.generateAnchorText=function(e,n){var t=function(e){return e.replace(/\s+/g,"_")}(e);return t=t.replace(/\&+/g,"").replace(/\&+/g,""),!0===n&&(t=function(e){return(e=encodeURIComponent(e)).replace(/\%+/g,".")}(t)),t},r.removeDuplicateIds=function(e,n){for(var t=n.getElementsByTagName("a"),r=function(n){var r=t[n].innerText,o=t[n].hash,i=Array.from(e).filter(function(e){return e.id===r});if(1===i.length)return"continue";var a=0;i.forEach(function(e){for(var n=e.id+"-"+a,r=0,i=Array.from(t);r<i.length;r++){var c=i[r];if(c.hash===o){c.href="#"+n;break}}e.id=n,a++})},o=0;o<t.length;o++)r(o)},e}(),e.renderAnchorLink=t}); | ||
//# sourceMappingURL=mokuji.umd.js.map |
{ | ||
"name": "mokuji.js", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "A table of content JavaScript Library", | ||
@@ -10,7 +10,7 @@ "scripts": { | ||
"test": "npm run lint", | ||
"prepare": "npm run clean && npm run build" | ||
"prepare": "npm run clean && npm run build && husky install" | ||
}, | ||
"source": "src/index.ts", | ||
"main": "dist/mokuji.js", | ||
"types": "dist/mokuji.d.ts", | ||
"types": "dist/index.d.ts", | ||
"module": "dist/mokuji.module.js", | ||
@@ -25,3 +25,5 @@ "esmodule": "dist/mokuji.modern.js", | ||
"lib/", | ||
"src/" | ||
"src/", | ||
"LICENSE", | ||
"READNME.md" | ||
], | ||
@@ -51,16 +53,11 @@ "lint-staged": { | ||
"@babel/plugin-proposal-optional-chaining": "^7.13.12", | ||
"@types/node": "~14.14.41", | ||
"@types/node": "~17.0.23", | ||
"cross-env": "^5.2.0", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.2.11", | ||
"microbundle": "^0.13.3", | ||
"prettier": "^2.3.2", | ||
"husky": "^7.0.4", | ||
"lint-staged": "^12.3.7", | ||
"microbundle": "^0.14.2", | ||
"prettier": "^2.6.0", | ||
"rimraf": "^3.0.2", | ||
"typescript": "~4.2.4" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
"typescript": "~4.6.2" | ||
} | ||
} |
@@ -15,3 +15,3 @@ mokuji.js | ||
```javascript | ||
import Mokuji from 'mokuji.js'; | ||
import { Mokuji } from 'mokuji.js'; | ||
@@ -18,0 +18,0 @@ let textElement = document.querySelector('.text'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
66014
0