bonze 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bonze.esm.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * bonze
3
3
  * Super tiny chainable and extendable tool wrapping native `querySelectorAll` for selecting, creating and filtering DOM Elements with ease.
4
4
  * https://github.com/jaysalvat/bonze
5
- * @version 1.6.2 built 2026-02-20 16:03:00.194
5
+ * @version 1.7.2 built 2026-02-20 17:00:00.488
6
6
  * @license MIT
7
7
  * @author Jay Salvat http://jaysalvat.com
8
8
  */
@@ -1,2 +1,2 @@
1
- /*! bonze v1.6.2 - github.com/jaysalvat/bonze */
1
+ /*! bonze v1.7.2 - github.com/jaysalvat/bonze */
2
2
  function e(t,n=null){let l=[];if(!t)return e(l);if(t._bonze)return t;if("function"==typeof t)return document.addEventListener("DOMContentLoaded",t);if(t instanceof Array)t.forEach(t=>{e(t)(e=>l.push(e))});else if(t.nodeType)l=[t];else if(t.match(/^\s*<(\w+|!)[^>]*>/)){const e=document.createElement("div");e.innerHTML=t.trim(),l=[].slice.call(e.childNodes)}else(n?e(n)():[document]).forEach(n=>{n=e(n)(0);const r=[].slice.call(n.querySelectorAll(t));l=l.concat(r)});l=l.slice();const r=e=>void 0===e?l:"number"==typeof e?l[e]:("function"==typeof e&&l.forEach((t,n)=>e.call(t,t,n,l)),r),c=(t,n)=>{const l=e(n);return l._prev=r,t?l(t):l};return r._bonze=!0,r.first=e=>c(e,l[0]),r.last=e=>c(e,l[l.length-1]),r.odd=e=>c(e,l.filter((e,t)=>!(t%2))),r.even=e=>c(e,l.filter((e,t)=>t%2)),r.nth=(e,t)=>c(t,l[e]),r.filter=(e,t)=>c(t,l.filter((t,n)=>e(t,n,l))),r.siblings=e=>c(e,[...new Set(l.flatMap(e=>e.parentNode?[].slice.call(e.parentNode.children).filter(t=>t!==e):[]))]),r.set=t=>{const n=e(t(l));return n._prev=r,n},r.back=()=>r._prev||r,r.each=r,Object.entries(e.plugins).forEach(([t,n])=>{r[t]=(...t)=>{e(l)((...e)=>{n.apply(e[0],[...e,...t])})}}),r}e.plugins={},e.plugin=function(t,n){e.plugins[t]=n};export{e as default};
package/dist/bonze.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * bonze
3
3
  * Super tiny chainable and extendable tool wrapping native `querySelectorAll` for selecting, creating and filtering DOM Elements with ease.
4
4
  * https://github.com/jaysalvat/bonze
5
- * @version 1.6.2 built 2026-02-20 16:03:00.194
5
+ * @version 1.7.2 built 2026-02-20 17:00:00.488
6
6
  * @license MIT
7
7
  * @author Jay Salvat http://jaysalvat.com
8
8
  */
package/dist/bonze.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! bonze v1.6.2 - github.com/jaysalvat/bonze */
1
+ /*! bonze v1.7.2 - github.com/jaysalvat/bonze */
2
2
  var e,n;e=this,n=function(){"use strict";function e(n,t=null){let i=[];if(!n)return e(i);if(n._bonze)return n;if("function"==typeof n)return document.addEventListener("DOMContentLoaded",n);if(n instanceof Array)n.forEach(n=>{e(n)(e=>i.push(e))});else if(n.nodeType)i=[n];else if(n.match(/^\s*<(\w+|!)[^>]*>/)){const e=document.createElement("div");e.innerHTML=n.trim(),i=[].slice.call(e.childNodes)}else(t?e(t)():[document]).forEach(t=>{t=e(t)(0);const o=[].slice.call(t.querySelectorAll(n));i=i.concat(o)});i=i.slice();const o=e=>void 0===e?i:"number"==typeof e?i[e]:("function"==typeof e&&i.forEach((n,t)=>e.call(n,n,t,i)),o),l=(n,t)=>{const i=e(t);return i._prev=o,n?i(n):i};return o._bonze=!0,o.first=e=>l(e,i[0]),o.last=e=>l(e,i[i.length-1]),o.odd=e=>l(e,i.filter((e,n)=>!(n%2))),o.even=e=>l(e,i.filter((e,n)=>n%2)),o.nth=(e,n)=>l(n,i[e]),o.filter=(e,n)=>l(n,i.filter((n,t)=>e(n,t,i))),o.siblings=e=>l(e,[...new Set(i.flatMap(e=>e.parentNode?[].slice.call(e.parentNode.children).filter(n=>n!==e):[]))]),o.set=n=>{const t=e(n(i));return t._prev=o,t},o.back=()=>o._prev||o,o.each=o,Object.entries(e.plugins).forEach(([n,t])=>{o[n]=(...n)=>{e(i)((...e)=>{t.apply(e[0],[...e,...n])})}}),o}return e.plugins={},e.plugin=function(n,t){e.plugins[n]=t},e},"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).bonze=n();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonze",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Super tiny chainable and extendable tool wrapping native `querySelectorAll` for selecting, creating and filtering DOM Elements with ease.",
5
5
  "homepage": "http://jaysalvat.com",
6
6
  "type": "module",
@@ -18,12 +18,10 @@
18
18
  "prewatch": "rm -rf ./dist",
19
19
  "watch": "rollup -c --watch",
20
20
  "build": "rollup -c",
21
- "version:patch": "npm version patch -m 'Bump to patch v%s'",
22
- "version:minor": "npm version minor -m 'Bump to minor v%s'",
23
- "version:major": "npm version major -m 'Bump to major v%s'",
24
- "release:patch": "npm version patch -m 'Release patch v%s' && git push --tags",
25
- "release:minor": "npm version minor -m 'Release minor v%s' && git push --tags",
26
- "release:major": "npm version major -m 'Release major v%s' && git push --tags",
21
+ "version": "npm run build",
22
+ "release:patch": "npm version patch -m 'Release patch v%s' && npm publish",
23
+ "release:minor": "npm version minor -m 'Release minor v%s' && npm publish",
24
+ "release:major": "npm version major -m 'Release major v%s' && npm publish",
27
25
  "install-hooks": "chmod +x .githooks/*; for file in `ls .githooks`; do ln -sf ../../.githooks/${file} .git/hooks/${file}; done",
28
26
  "postinstall": "npm run install-hooks"
29
27
  },