Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@seven.io/counter

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@seven.io/counter - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

4

babel.config.json

@@ -6,6 +6,4 @@ {

{
"corejs": "3.32",
"forceAllTransforms": true,
"spec": true,
"useBuiltIns": "usage"
"spec": true
}

@@ -12,0 +10,0 @@ ]

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("core-js/modules/es.global-this.js"),require("core-js/modules/es.array.for-each.js"),require("core-js/modules/es.object.to-string.js"),require("core-js/modules/web.dom-collections.for-each.js"),require("core-js/modules/es.array.from.js"),require("core-js/modules/es.string.iterator.js"),require("core-js/modules/es.array.includes.js"),require("core-js/modules/es.string.includes.js"),require("core-js/modules/es.object.freeze.js"),require("core-js/modules/es.number.parse-float.js"),require("core-js/modules/es.number.constructor.js"),require("core-js/modules/es.array.iterator.js"),require("core-js/modules/web.dom-collections.iterator.js"),require("core-js/modules/es.array.slice.js"),require("core-js/modules/es.array.splice.js"),require("core-js/modules/es.array.push.js"),require("core-js/modules/es.array.map.js"),require("core-js/modules/es.array.filter.js"),require("core-js/modules/es.array.concat.js")):"function"==typeof define&&define.amd?define(["exports","core-js/modules/es.global-this.js","core-js/modules/es.array.for-each.js","core-js/modules/es.object.to-string.js","core-js/modules/web.dom-collections.for-each.js","core-js/modules/es.array.from.js","core-js/modules/es.string.iterator.js","core-js/modules/es.array.includes.js","core-js/modules/es.string.includes.js","core-js/modules/es.object.freeze.js","core-js/modules/es.number.parse-float.js","core-js/modules/es.number.constructor.js","core-js/modules/es.array.iterator.js","core-js/modules/web.dom-collections.iterator.js","core-js/modules/es.array.slice.js","core-js/modules/es.array.splice.js","core-js/modules/es.array.push.js","core-js/modules/es.array.map.js","core-js/modules/es.array.filter.js","core-js/modules/es.array.concat.js"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).SevenCounter={})}(this,(function(e){"use strict";var r=function(){return r=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var s in r=arguments[t])Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s]);return e},r.apply(this,arguments)};function t(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],o=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var o,s,n=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(e){s={error:e}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(s)throw s.error}}return a}function s(e,r,t){if(t||2===arguments.length)for(var o,s=0,n=r.length;s<n;s++)!o&&s in r||(o||(o=Array.prototype.slice.call(r,0,s)),o[s]=r[s]);return e.concat(o||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var n,a=function(e,r){var t=e.offsetWidth-r.offsetWidth;r.style.left="".concat(t,"px");var o=e.offsetHeight-r.offsetHeight;r.style.top="".concat(o,"px")},i=Object.freeze(["0","1","2","3","4","5","6","7","8","9","@","Δ"," ","s","\n","¡","P","¿","p","£","_","!","A","Q","a","q","$","Φ",'"',"B","R","b","r","¥","Γ","#","C","S","c","s","è","Λ","¤","D","T","d","t","é","Ω","%","E","U","e","u","ù","Π","&","F","V","f","v","ì","Ψ","'","G","W","g","w","ò","Σ","(","H","X","h","x","Ç","Θ",")","I","Y","i","y","Ξ","*",":","J","Z","j","z","Ø","+",";","K","Ä","k","ä","ø","Æ",",","<","L","Ö","l","ö","æ","-","=","M","Ñ","m","ñ","Å","ß",".",">","N","Ü","n","ü","å","É","/","?","O","§","o","à"]),c=Object.freeze(["^","|","€","{","}","[","]","~","\\"]),u=Object.freeze(s(s([],o(i),!1),o(c),!1));e.CharLimit=void 0,(n=e.CharLimit||(e.CharLimit={}))[n.GSM7=160]="GSM7",n[n.GSM7_REDUCED=153]="GSM7_REDUCED",n[n.UCS2=70]="UCS2",n[n.UCS2_REDUCED=67]="UCS2_REDUCED";var l=function(e,r){var t=1;return"GSM7"===e&&c.includes(r)&&t++,t},d=function(e){return u.includes(e)},f=function(e,r,n,a,i){var f,j,m,y,h,p=[],v=0,C=!1;try{for(var S=t(Array(a).entries()),E=S.next();!E.done;E=S.next()){var b=o(E.value,2),g=b[0],q=b[1];q=[];var U=1,w=v+i,D=(h=g,["05","00","03","CC","0".concat(a),"0".concat(h)]),M=D.length,x=n.slice(v,w);try{for(var G=(m=void 0,t(x)),L=G.next();!L.done;L=G.next()){var _=L.value,O=M-1+U;C||(u.includes(_)?c.includes(_)&&(q[O-1]="ESC"):C=!0),q[O]=_,U++}}catch(e){m={error:e}}finally{try{L&&!L.done&&(y=G.return)&&y.call(G)}finally{if(m)throw m.error}}v=w,r&&q.splice.apply(q,s([0,M],o(D),!1)),p.push(s([],o(q.filter((function(e){return e})).map((function(r){var t,o=r.length>1&&"ESC"!==r;return{character:r,encoding:o?"GSM7":(t=l(e,r),1===t?"GSM7":"UCS2"),escape:!o&&"ESC"===r,gsm7:!!o||d(r),length:1,udh:o,unicode:!o&&C}}))),!1))}}catch(e){f={error:e}}finally{try{E&&!E.done&&(j=S.return)&&j.call(S)}finally{if(f)throw f.error}}return p},j=function(r){var o=("string"==typeof r?r:r.value).split(""),s=function(e){var r,o;try{for(var s=t(e),n=s.next();!n.done;n=s.next()){var a=n.value;if(!u.includes(a))return"UCS2"}}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return"GSM7"}(o),n=function(e,r){var o,s,n=0;try{for(var a=t(r),i=a.next();!i.done;i=a.next()){var c=i.value;n+=l(e,c)}}catch(e){o={error:e}}finally{try{i&&!i.done&&(s=a.return)&&s.call(a)}finally{if(o)throw o.error}}return n}(s,o),a=function(r,t){var o={GSM7:e.CharLimit.GSM7,UCS2:e.CharLimit.UCS2};return o[r]<t&&(o.GSM7=e.CharLimit.GSM7_REDUCED,o.UCS2=e.CharLimit.UCS2_REDUCED),o}(s,n),i=function(e,r,t){var o=e/r[t];return 1>=o?o=1:(o=Number.parseFloat(String(o)),o=Math.floor(o),o++),o}(n,a,s),c=i>1,d=function(r,t){return"GSM7"===t?r?e.CharLimit.GSM7_REDUCED:e.CharLimit.GSM7:r?e.CharLimit.UCS2_REDUCED:e.CharLimit.UCS2}(c,s);return{charCount:n,charLimit:d,encoding:s,messages:f(s,c,o,i,d),msgCount:i}},m=function(e,r){return e.textContent=(o=(t=r).charCount,s=t.encoding,n=t.msgCount,"".concat(o,"/").concat(n," [").concat(s,"]"));var t,o,s,n},y=function(e){Array.from(document.querySelectorAll(e.selector)).forEach((function(r){var t,o=!1;!1!==e.stats&&(!0===e.stats?((t=document.createElement("span")).style.position="absolute",r.insertAdjacentElement(e.position,t),o=!0,a(r,t)):(t="string"==typeof e.stats?document.querySelector(e.stats):e.stats,o=!1),t&&m(t,j(r))),r.addEventListener("input",(function(){return function(e,r,t){var o=j(e);r&&(m(r,o),t&&a(e,r)),document.dispatchEvent(new CustomEvent("seven_counter_input",{detail:o}))}(r,t,o)}))}))},h="window"in globalThis,p=r({initEvent:"DOMContentLoaded",position:"afterend",selector:"*[data-seven-sms]",standalone:!1,stats:!0},h&&window.SEVEN_COUNTER_OPTIONS||{});h&&!p.standalone&&function(e){document.addEventListener(e.initEvent,(function(){return y(e)}),{once:!0})}(p),e.getCounterStats=j}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).SevenCounter={})}(this,(function(t){"use strict";var e=function(){return e=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},e.apply(this,arguments)};function r(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function o(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var i,a=function(t,e){var r=t.offsetWidth-e.offsetWidth;e.style.left="".concat(r,"px");var n=t.offsetHeight-e.offsetHeight;e.style.top="".concat(n,"px")},c=Object.freeze(["0","1","2","3","4","5","6","7","8","9","@","Δ"," ","s","\n","¡","P","¿","p","£","_","!","A","Q","a","q","$","Φ",'"',"B","R","b","r","¥","Γ","#","C","S","c","s","è","Λ","¤","D","T","d","t","é","Ω","%","E","U","e","u","ù","Π","&","F","V","f","v","ì","Ψ","'","G","W","g","w","ò","Σ","(","H","X","h","x","Ç","Θ",")","I","Y","i","y","Ξ","*",":","J","Z","j","z","Ø","+",";","K","Ä","k","ä","ø","Æ",",","<","L","Ö","l","ö","æ","-","=","M","Ñ","m","ñ","Å","ß",".",">","N","Ü","n","ü","å","É","/","?","O","§","o","à"]),u=Object.freeze(["^","|","€","{","}","[","]","~","\\"]),l=Object.freeze(o(o([],n(c),!1),n(u),!1));t.CharLimit=void 0,(i=t.CharLimit||(t.CharLimit={}))[i.GSM7=160]="GSM7",i[i.GSM7_REDUCED=153]="GSM7_REDUCED",i[i.UCS2=70]="UCS2",i[i.UCS2_REDUCED=67]="UCS2_REDUCED";var f=function(t,e){var r=1;return"GSM7"===t&&u.includes(e)&&r++,r},s=function(t){return l.includes(t)},d=function(t,e,i,a,c){var d,v,y,h,p,C=[],S=0,m=!1;try{for(var E=r(Array(a).entries()),g=E.next();!g.done;g=E.next()){var U=n(g.value,2),b=U[0],D=U[1];D=[];var M=1,x=S+c,G=(p=b,["05","00","03","CC","0".concat(a),"0".concat(p)]),L=G.length,w=i.slice(S,x);try{for(var _=(y=void 0,r(w)),O=_.next();!O.done;O=_.next()){var R=O.value,j=L-1+M;m||(l.includes(R)?u.includes(R)&&(D[j-1]="ESC"):m=!0),D[j]=R,M++}}catch(t){y={error:t}}finally{try{O&&!O.done&&(h=_.return)&&h.call(_)}finally{if(y)throw y.error}}S=x,e&&D.splice.apply(D,o([0,L],n(G),!1)),C.push(o([],n(D.filter((function(t){return t})).map((function(e){var r,n=e.length>1&&"ESC"!==e;return{character:e,encoding:n?"GSM7":(r=f(t,e),1===r?"GSM7":"UCS2"),escape:!n&&"ESC"===e,gsm7:!!n||s(e),length:1,udh:n,unicode:!n&&m}}))),!1))}}catch(t){d={error:t}}finally{try{g&&!g.done&&(v=E.return)&&v.call(E)}finally{if(d)throw d.error}}return C},v=function(e){var n=("string"==typeof e?e:e.value).split(""),o=function(t){var e,n;try{for(var o=r(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(!l.includes(a))return"UCS2"}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return"GSM7"}(n),i=function(t,e){var n,o,i=0;try{for(var a=r(e),c=a.next();!c.done;c=a.next()){var u=c.value;i+=f(t,u)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}(o,n),a=function(e,r){var n={GSM7:t.CharLimit.GSM7,UCS2:t.CharLimit.UCS2};return n[e]<r&&(n.GSM7=t.CharLimit.GSM7_REDUCED,n.UCS2=t.CharLimit.UCS2_REDUCED),n}(o,i),c=function(t,e,r){var n=t/e[r];return 1>=n?n=1:(n=Number.parseFloat(String(n)),n=Math.floor(n),n++),n}(i,a,o),u=c>1,s=function(e,r){return"GSM7"===r?e?t.CharLimit.GSM7_REDUCED:t.CharLimit.GSM7:e?t.CharLimit.UCS2_REDUCED:t.CharLimit.UCS2}(u,o);return{charCount:i,charLimit:s,encoding:o,messages:d(o,u,n,c,s),msgCount:c}},y=function(t,e){return t.textContent=(n=(r=e).charCount,o=r.encoding,i=r.msgCount,"".concat(n,"/").concat(i," [").concat(o,"]"));var r,n,o,i},h=function(t){Array.from(document.querySelectorAll(t.selector)).forEach((function(e){var r,n=!1;!1!==t.stats&&(!0===t.stats?((r=document.createElement("span")).style.position="absolute",e.insertAdjacentElement(t.position,r),n=!0,a(e,r)):(r="string"==typeof t.stats?document.querySelector(t.stats):t.stats,n=!1),r&&y(r,v(e))),e.addEventListener("input",(function(){return function(t,e,r){var n=v(t);e&&(y(e,n),r&&a(t,e)),document.dispatchEvent(new CustomEvent("seven_counter_input",{detail:n}))}(e,r,n)}))}))},p="window"in globalThis,C=e({initEvent:"DOMContentLoaded",position:"afterend",selector:"*[data-seven-sms]",standalone:!1,stats:!0},p&&window.SEVEN_COUNTER_OPTIONS||{});p&&!C.standalone&&function(t){document.addEventListener(t.initEvent,(function(){return h(t)}),{once:!0})}(C),t.getCounterStats=v}));

@@ -13,13 +13,12 @@ {

"devDependencies": {
"@babel/preset-env": "^7.22.14",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "^25.0.4",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.1.3",
"@types/jest": "^29.5.4",
"core-js": "^3.32.1",
"jest": "^29.6.4",
"jest-environment-jsdom": "^29.6.4",
"@babel/preset-env": "^7.22.20",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-commonjs": "^25.0.5",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@types/jest": "^29.5.5",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-runner-groups": "^2.2.0",
"rollup": "^3.28.1",
"rollup": "^4.0.2",
"ts-jest": "^29.1.1",

@@ -46,3 +45,3 @@ "tslib": "^2.6.2",

"types": "dist/index.d.ts",
"version": "1.6.0"
"version": "1.6.1"
}

@@ -57,4 +57,4 @@ ![](https://www.seven.io/wp-content/uploads/Logo.svg "seven Logo")

Need help? Feel free to [contact us](https://www.seven.io/en/company/contact/).
Need help? Feel free to [contact us](https://www.seven.io/en/company/contact).
[![MIT](https://img.shields.io/badge/License-MIT-teal.svg)](LICENSE.txt)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc