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

@pkmn/protocol

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pkmn/protocol - npm Package Compare versions

Comparing version 0.6.22 to 0.6.23

build/chunk-BXULQECF.mjs

4

build/index.js
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkSS3ZXIDKjs = require('./chunk-SS3ZXIDK.js');
var _chunkXXO6TZTOjs = require('./chunk-XXO6TZTO.js');
exports.Protocol = _chunkSS3ZXIDKjs.Protocol;
exports.Protocol = _chunkXXO6TZTOjs.Protocol;
//# sourceMappingURL=index.js.map
window.pkmn=window.pkmn||{};window.pkmn.protocol=(()=>{var d=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var A=(o,e)=>{for(var t in e)d(o,t,{get:e[t],enumerable:!0})},N=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of g(e))!u.call(o,a)&&a!==t&&d(o,a,{get:()=>e[a],enumerable:!(r=y(e,a))||r.enumerable});return o};var f=o=>N(d({},"__esModule",{value:!0}),o);var T={};A(T,{Protocol:()=>c});function p(o){return(""+o).toLowerCase().replace(/[^a-z0-9]+/g,"")}var c=new class{constructor(){this.ARGS={"|init|":1,"|title|":1,"|users|":1,"||":1,"|html|":1,"|uhtml|":1,"|pagehtml|":1,"|uhtmlchange|":1,"|join|":1,"|leave|":1,"|name|":1,"|chat|":1,"|notify|":1,"|:|":1,"|c:|":1,"|t:|":1,"|battle|":1,"|popup|":1,"|pm|":1,"|usercount|":1,"|nametaken|":1,"|challstr|":1,"|updateuser|":1,"|formats|":1,"|updatesearch|":1,"|message|":1,"|updatechallenges|":1,"|queryresponse|":1,"|unlink|":1,"|raw|":1,"|error|":1,"|bigerror|":1,"|chatmsg|":1,"|chatmsg-raw|":1,"|controlshtml|":1,"|fieldhtml|":1,"|debug|":1,"|deinit|":1,"|selectorhtml|":1,"|refresh|":1,"|tempnotify|":1,"|tempnotifyoff|":1,"|noinit|":1,"|hidelines|":1,"|expire|":1,"|askreg|":1,"|tournament|create|":1,"|tournament|update|":1,"|tournament|updateEnd|":1,"|tournament|error|":1,"|tournament|forceend|":1,"|tournament|join|":1,"|tournament|leave|":1,"|tournament|replace|":1,"|tournament|start|":1,"|tournament|disqualify|":1,"|tournament|battlestart|":1,"|tournament|battleend|":1,"|tournament|end|":1,"|tournament|scouting|":1,"|tournament|autostart|":1,"|tournament|autodq|":1,"|player|":1,"|teamsize|":1,"|gametype|":1,"|gen|":1,"|tier|":1,"|rated|":1,"|seed|":1,"|rule|":1,"|teampreview|":1,"|clearpoke|":1,"|poke|":1,"|start|":1,"|done|":1,"|request|":1,"|inactive|":1,"|inactiveoff|":1,"|upkeep|":1,"|turn|":1,"|win|":1,"|tie|":1,"|move|":1,"|switch|":1,"|drag|":1,"|detailschange|":1,"|replace|":1,"|swap|":1,"|cant|":1,"|faint|":1,"|-formechange|":1,"|-fail|":1,"|-block|":1,"|-notarget|":1,"|-miss|":1,"|-damage|":1,"|-heal|":1,"|-sethp|":1,"|-status|":1,"|-curestatus|":1,"|-cureteam|":1,"|-boost|":1,"|-unboost|":1,"|-setboost|":1,"|-swapboost|":1,"|-invertboost|":1,"|-clearboost|":1,"|-clearallboost|":1,"|-clearpositiveboost|":1,"|-ohko|":1,"|-clearnegativeboost|":1,"|-copyboost|":1,"|-weather|":1,"|-fieldstart|":1,"|-fieldend|":1,"|-sidestart|":1,"|-sideend|":1,"|-start|":1,"|-end|":1,"|-crit|":1,"|-supereffective|":1,"|-resisted|":1,"|-immune|":1,"|-item|":1,"|-enditem|":1,"|-ability|":1,"|-endability|":1,"|-transform|":1,"|-mega|":1,"|-primal|":1,"|-burst|":1,"|-zpower|":1,"|-zbroken|":1,"|-activate|":1,"|-fieldactivate|":1,"|-hint|":1,"|-center|":1,"|-message|":1,"|-combine|":1,"|-waiting|":1,"|-prepare|":1,"|-mustrecharge|":1,"|-hitcount|":1,"|-singlemove|":1,"|-singleturn|":1,"|-anim|":1,"|warning|":1,"|-candynamax|":1,"|updatepoke|":1,"|-swapsideconditions|":1,"|-terastallize|":1,"|sentchoice|":1,"|customgroups|":1};this.ARGS_WITH_KWARGS={"|move|":1,"|switch|":1,"|cant|":1,"|-formechange|":1,"|-fail|":1,"|-block|":1,"|-damage|":1,"|-heal|":1,"|-sethp|":1,"|-status|":1,"|swap|":1,"|-curestatus|":1,"|-cureteam|":1,"|-boost|":1,"|-unboost|":1,"|-setboost|":1,"|-swapboost|":1,"|-invertboost|":1,"|-clearnegativeboost|":1,"|-weather|":1,"|-fieldstart|":1,"|-fieldend|":1,"|-sidestart|":1,"|-singlemove|":1,"|-sideend|":1,"|-start|":1,"|-end|":1,"|-immune|":1,"|-item|":1,"|-enditem|":1,"|-ability|":1,"|-endability|":1,"|-transform|":1,"|-activate|":1,"|-singleturn|":1,"|-clearallboost|":1,"|-anim|":1,"|-copyboost|":1,"|-clearboost|":1,"|-miss|":1}}*parse(o){let e=o.split(`
`),t="";for(let[r,a]of e.entries())if(r===0&&a[0]===">"){t=a.slice(1);continue}else if(a){let{args:n,kwArgs:s}=this.parseBattleLine(a);yield{roomid:t,args:n,kwArgs:s}}}key(o,e=!1){let t=o[0]==="tournament"?`|${o[0]}|${o[1]}|`:`|${o[0]}|`;return e||t in this.ARGS?t:void 0}parseLine(o,e){if(!o.startsWith("|"))return["",o];if(o==="|")return["done"];let t=o.indexOf("|",1),r=o.slice(1,t);switch(r){case"chatmsg":case"chatmsg-raw":case"raw":case"error":case"html":case"inactive":case"inactiveoff":case"warning":case"title":case"formats":case"fieldhtml":case"controlshtml":case"bigerror":case"debug":case"tier":case"challstr":case"popup":case"":return m([r,o.slice(t+1)]);case"c":case"chat":case"uhtml":case"uhtmlchange":let a=o.indexOf("|",t+1);return m([r,o.slice(t+1,a),o.slice(a+1)]);case"c:":case"pm":let n=o.indexOf("|",t+1),s=o.indexOf("|",n+1);return m([r,o.slice(t+1,n),o.slice(n+1,s),o.slice(s+1)])}return e?null:m(o.slice(1).split("|"))}parseBattleLine(o){let e=c.parseLine(o,!0);if(e)return{args:e,kwArgs:{}};e=o.slice(1).split("|");let t={};for(;e.length>1;){let r=e[e.length-1];if(r.charAt(0)!=="[")break;let a=r.indexOf("]");if(a<=0)break;t[r.slice(1,a)]=r.slice(a+1).trim()||!0,e.pop()}return I({args:m(e),kwArgs:t})}parsePokemonIdent(o){let e=o.indexOf(":"),t=o.slice(0,e),r=o.slice(e+2),a,n;return t.length<3?(a=t,n=null):(a=t.slice(0,2),n=t.charAt(2)),{player:a,position:n,name:r}}parseDetails(o,e,t="",r={}){r.details=t;let a=!o;r.name=o,r.speciesForme=o,r.level=100,r.shiny=!1,r.gender=void 0,r.ident=a?"":e,r.searchid=a?"":`${e}|${t}`;let n=t.split(", ");n[n.length-1].startsWith("tera:")&&(r.terastallized=n[n.length-1].slice(5),n.pop()),n[n.length-1]==="shiny"&&(r.shiny=!0,n.pop());let s=n[n.length-1];return(s==="M"||s==="F")&&(r.gender=s,n.pop()),n[1]&&(r.level=parseInt(n[1].substr(1))||100),n[0]&&(r.speciesForme=n[0]),r}parseHealth(o,e={}){let[t,r]=o.split(" ");if(e.hpcolor="",t==="0"||t==="0.0")e.maxhp||(e.maxhp=100),e.hp=0;else if(t.indexOf("/")>0){let[a,n]=t.split("/");if(isNaN(parseFloat(a))||isNaN(parseFloat(n)))return null;e.hp=parseFloat(a),e.maxhp=parseFloat(n),e.hp>e.maxhp&&(e.hp=e.maxhp);let s=n.slice(-1);(s==="y"||s==="g")&&(e.hpcolor=s)}else isNaN(parseFloat(t))||(e.maxhp||(e.maxhp=100),e.hp=e.maxhp*parseFloat(t)/100);return r?r==="par"||r==="brn"||r==="slp"||r==="frz"||r==="tox"||r==="psn"&&e.status!=="tox"?e.status=r:r==="fnt"&&(e.hp=0,e.fainted=!0):e.status=void 0,e}parseEffect(o,e=t=>t.trim()){return o?o.startsWith("item:")||o.startsWith("move:")?{name:e(o.slice(5)),type:o.slice(0,4)}:o.startsWith("ability:")?{name:e(o.slice(8)),type:"ability"}:{name:e(o)}:{name:e("")}}parseRequest(o){let e=JSON.parse(o);if(e.requestType||(e.requestType="move",e.forceSwitch?e.requestType="switch":e.teamPreview?e.requestType="team":e.wait&&(e.requestType="wait")),e.requestType==="wait"&&(e.noCancel=!0),e.side)for(let t of e.side.pokemon)this.parseDetails(t.ident.substr(4),t.ident,t.details,t),this.parseHealth(t.condition,t),t.ability=t.ability||t.baseAbility;if(e.active){e.active=e.active.map((t,r)=>e.side.pokemon[r].fainted?null:t);for(let t of e.active)if(t){for(let r of t.moves)r.move&&(r.name=r.move),r.id=p(r.name);if(t.maxMoves){t.maxMoves.maxMoves&&(t.canGigantamax=t.maxMoves.gigantamax,t.maxMoves=t.maxMoves.maxMoves);for(let r of t.maxMoves)r.id=r.move}if(t.canZMove){t.zMoves=t.canZMove;for(let r of t.zMoves)r&&(r.move&&(r.name=r.move),r.id=p(r.name))}}}return e}parseChallenges(o){return JSON.parse(o)}parseSearchState(o){return JSON.parse(o)}parseTournamentUpdate(o){return JSON.parse(o)}parseCustomGroupsJSON(o){return JSON.parse(o)}parseNameParts(o){let e="";/[A-Za-z0-9]/.test(o.charAt(0))||(e=o.charAt(0),o=o.slice(1));let t=o,r=o.indexOf("@"),a="",n=!1;return r>0&&(t=o.slice(0,r),a=o.slice(r+1),a.startsWith("!")&&(n=!0,a=a.slice(1))),{group:e,name:t,away:n,status:a}}};function m(o){switch(o[0]){case"name":case"n":case"N":{let[e,t,r]=o;return["name",t,r,e==="N"]}case"chat":case"c":{let[,e,t]=o;return["chat",e,t]}case"join":case"j":case"J":{let[e,t]=o;return["join",t,e==="J"]}case"leave":case"l":case"L":{let[e,t]=o;return["leave",t,e==="L"]}case"battle":case"b":{let[,e,t,r]=o;return["battle",e,t,r]}}return o}var P=new Set(["ingrain","quickguard","wideguard","craftyshield","matblock","protect","mist","safeguard","electricterrain","mistyterrain","psychicterrain","telepathy","stickyhold","suctioncups","aromaveil","flowerveil","sweetveil","disguise","safetygoggles","protectivepads"]),h=new Set(["ability: Damp","ability: Dazzling","ability: Queenly Majesty","ability: Armor Tail"]),x=new Set(["thundercage","clamp","whirlpool","firespin","magmastorm","sandtomb","infestation","trapped","bind","snaptrap","wrap"]),k=new Set(["eeriespell","gmaxdepletion","spite","grudge","forewarn","sketch","leppaberry","mysteryberry"]),b=new Set(["dryskin","eartheater","voltabsorb","waterabsorb"]);function I({args:o,kwArgs:e}){switch(o[0]){case"-activate":{if(e.item||e.move||e.number||e.ability)return{args:o,kwArgs:e};let[,t,r,a,n]=o,s=r,i=e.of,l=c.parseEffect(s,p).name;if(e.block)return{args:["-fail",t],kwArgs:e};if(l==="sturdy")return{args:["-activate",t,"ability: Sturdy"],kwArgs:e};if(l==="wonderguard")return{args:["-immune",t],kwArgs:{from:"ability: Wonder Guard"}};if(l==="beatup"&&e.of)return{args:o,kwArgs:{name:e.of}};if(P.has(l))return i?(e.of=t,{args:["-block",i,s,a||""],kwArgs:e}):{args:["-block",t,s,a||""],kwArgs:e};if(l==="charge")return{args:["-singlemove",t,"Charge"],kwArgs:{of:i||void 0}};if(x.has(l))return{args:["-start",t,s],kwArgs:{of:i||""}};if(l==="fairylock")return{args:["-fieldactivate",s],kwArgs:{}};if(l==="symbiosis"||l==="poltergeist")e.item=a;else if(l==="magnitude")e.number=a;else if(l==="skillswap"||l==="mummy"||l==="lingeringaroma")e.ability=a,e.ability2=n;else if(l==="wanderingspirit")if(a)e.ability=a,e.ability2=n;else return{args:["-ability",t,"Wandering Spirit"],kwArgs:{}};else k.has(l)&&(e.move=a,e.number=n);return{args:["-activate",t,s,i||""],kwArgs:e}}case"-start":{(e.from==="Protean"||e.from==="Color Change")&&(e.from="ability:"+e.from);break}case"move":{e.from==="Magic Bounce"&&(e.from="ability: Magic Bounce");break}case"cant":{let[,t,r,a]=o;if(h.has(r))return{args:["-block",t,r,a,e.of||""],kwArgs:{}};break}case"-heal":{let t=c.parseEffect(e.from,p).name;b.has(t)&&(e.of="");break}case"gen":{let[,t]=o;return{args:["gen",Number(t)],kwArgs:{}}}case"-restoreboost":{o[0]="-clearnegativeboost";break}case"-nothing":o=["-activate","","move: Splash"]}return{args:o,kwArgs:e}}return f(T);})();
`),t="";for(let[r,a]of e.entries())if(r===0&&a[0]===">"){t=a.slice(1);continue}else if(a){let{args:n,kwArgs:s}=this.parseBattleLine(a);yield{roomid:t,args:n,kwArgs:s}}}key(o,e=!1){let t=o[0]==="tournament"?`|${o[0]}|${o[1]}|`:`|${o[0]}|`;return e||t in this.ARGS?t:void 0}parseLine(o,e){if(!o.startsWith("|"))return["",o];if(o==="|")return["done"];let t=o.indexOf("|",1),r=o.slice(1,t);switch(r){case"chatmsg":case"chatmsg-raw":case"raw":case"error":case"html":case"inactive":case"inactiveoff":case"warning":case"title":case"formats":case"selectorhtml":case"pagehtml":case"fieldhtml":case"controlshtml":case"bigerror":case"debug":case"tier":case"challstr":case"popup":case"":return i([r,o.slice(t+1)]);case"c":case"chat":case"uhtml":case"uhtmlchange":let a=o.indexOf("|",t+1);return i([r,o.slice(t+1,a),o.slice(a+1)]);case"c:":case"pm":let n=o.indexOf("|",t+1),s=o.indexOf("|",n+1);return i([r,o.slice(t+1,n),o.slice(n+1,s),o.slice(s+1)])}return e?null:i(o.slice(1).split("|"))}parseBattleLine(o){let e=c.parseLine(o,!0);if(e)return{args:e,kwArgs:{}};e=o.slice(1).split("|");let t={};for(;e.length>1;){let r=e[e.length-1];if(r.charAt(0)!=="[")break;let a=r.indexOf("]");if(a<=0)break;t[r.slice(1,a)]=r.slice(a+1).trim()||!0,e.pop()}return I({args:i(e),kwArgs:t})}parsePokemonIdent(o){let e=o.indexOf(":"),t=o.slice(0,e),r=o.slice(e+2),a,n;return t.length<3?(a=t,n=null):(a=t.slice(0,2),n=t.charAt(2)),{player:a,position:n,name:r}}parseDetails(o,e,t="",r={}){r.details=t;let a=!o;r.name=o,r.speciesForme=o,r.level=100,r.shiny=!1,r.gender=void 0,r.ident=a?"":e,r.searchid=a?"":`${e}|${t}`;let n=t.split(", ");n[n.length-1].startsWith("tera:")&&(r.terastallized=n[n.length-1].slice(5),n.pop()),n[n.length-1]==="shiny"&&(r.shiny=!0,n.pop());let s=n[n.length-1];return(s==="M"||s==="F")&&(r.gender=s,n.pop()),n[1]&&(r.level=parseInt(n[1].substr(1))||100),n[0]&&(r.speciesForme=n[0]),r}parseHealth(o,e={}){let[t,r]=o.split(" ");if(e.hpcolor="",t==="0"||t==="0.0")e.maxhp||(e.maxhp=100),e.hp=0;else if(t.indexOf("/")>0){let[a,n]=t.split("/");if(isNaN(parseFloat(a))||isNaN(parseFloat(n)))return null;e.hp=parseFloat(a),e.maxhp=parseFloat(n),e.hp>e.maxhp&&(e.hp=e.maxhp);let s=n.slice(-1);(s==="y"||s==="g")&&(e.hpcolor=s)}else isNaN(parseFloat(t))||(e.maxhp||(e.maxhp=100),e.hp=e.maxhp*parseFloat(t)/100);return r?r==="par"||r==="brn"||r==="slp"||r==="frz"||r==="tox"||r==="psn"&&e.status!=="tox"?e.status=r:r==="fnt"&&(e.hp=0,e.fainted=!0):e.status=void 0,e}parseEffect(o,e=t=>t.trim()){return o?o.startsWith("item:")||o.startsWith("move:")?{name:e(o.slice(5)),type:o.slice(0,4)}:o.startsWith("ability:")?{name:e(o.slice(8)),type:"ability"}:{name:e(o)}:{name:e("")}}parseRequest(o){let e=JSON.parse(o);if(e.requestType||(e.requestType="move",e.forceSwitch?e.requestType="switch":e.teamPreview?e.requestType="team":e.wait&&(e.requestType="wait")),e.requestType==="wait"&&(e.noCancel=!0),e.side)for(let t of e.side.pokemon)this.parseDetails(t.ident.substr(4),t.ident,t.details,t),this.parseHealth(t.condition,t),t.ability=t.ability||t.baseAbility;if(e.active){e.active=e.active.map((t,r)=>e.side.pokemon[r].fainted?null:t);for(let t of e.active)if(t){for(let r of t.moves)r.move&&(r.name=r.move),r.id=p(r.name);if(t.maxMoves){t.maxMoves.maxMoves&&(t.canGigantamax=t.maxMoves.gigantamax,t.maxMoves=t.maxMoves.maxMoves);for(let r of t.maxMoves)r.id=r.move}if(t.canZMove){t.zMoves=t.canZMove;for(let r of t.zMoves)r&&(r.move&&(r.name=r.move),r.id=p(r.name))}}}return e}parseChallenges(o){return JSON.parse(o)}parseSearchState(o){return JSON.parse(o)}parseTournamentUpdate(o){return JSON.parse(o)}parseCustomGroupsJSON(o){return JSON.parse(o)}parseNameParts(o){let e="";/[A-Za-z0-9]/.test(o.charAt(0))||(e=o.charAt(0),o=o.slice(1));let t=o,r=o.indexOf("@"),a="",n=!1;return r>0&&(t=o.slice(0,r),a=o.slice(r+1),a.startsWith("!")&&(n=!0,a=a.slice(1))),{group:e,name:t,away:n,status:a}}};function i(o){switch(o[0]){case"name":case"n":case"N":{let[e,t,r]=o;return["name",t,r,e==="N"]}case"chat":case"c":{let[,e,t]=o;return["chat",e,t]}case"join":case"j":case"J":{let[e,t]=o;return["join",t,e==="J"]}case"leave":case"l":case"L":{let[e,t]=o;return["leave",t,e==="L"]}case"battle":case"b":{let[,e,t,r]=o;return["battle",e,t,r]}}return o}var P=new Set(["ingrain","quickguard","wideguard","craftyshield","matblock","protect","mist","safeguard","electricterrain","mistyterrain","psychicterrain","telepathy","stickyhold","suctioncups","aromaveil","flowerveil","sweetveil","disguise","safetygoggles","protectivepads"]),h=new Set(["ability: Damp","ability: Dazzling","ability: Queenly Majesty","ability: Armor Tail"]),x=new Set(["thundercage","clamp","whirlpool","firespin","magmastorm","sandtomb","infestation","trapped","bind","snaptrap","wrap"]),k=new Set(["eeriespell","gmaxdepletion","spite","grudge","forewarn","sketch","leppaberry","mysteryberry"]),b=new Set(["dryskin","eartheater","voltabsorb","waterabsorb"]);function I({args:o,kwArgs:e}){switch(o[0]){case"-activate":{if(e.item||e.move||e.number||e.ability)return{args:o,kwArgs:e};let[,t,r,a,n]=o,s=r,m=e.of,l=c.parseEffect(s,p).name;if(e.block)return{args:["-fail",t],kwArgs:e};if(l==="sturdy")return{args:["-activate",t,"ability: Sturdy"],kwArgs:e};if(l==="wonderguard")return{args:["-immune",t],kwArgs:{from:"ability: Wonder Guard"}};if(l==="beatup"&&e.of)return{args:o,kwArgs:{name:e.of}};if(P.has(l))return m?(e.of=t,{args:["-block",m,s,a||""],kwArgs:e}):{args:["-block",t,s,a||""],kwArgs:e};if(l==="charge")return{args:["-singlemove",t,"Charge"],kwArgs:{of:m||void 0}};if(x.has(l))return{args:["-start",t,s],kwArgs:{of:m||""}};if(l==="fairylock")return{args:["-fieldactivate",s],kwArgs:{}};if(l==="symbiosis"||l==="poltergeist")e.item=a;else if(l==="magnitude")e.number=a;else if(l==="skillswap"||l==="mummy"||l==="lingeringaroma")e.ability=a,e.ability2=n;else if(l==="wanderingspirit")if(a)e.ability=a,e.ability2=n;else return{args:["-ability",t,"Wandering Spirit"],kwArgs:{}};else k.has(l)&&(e.move=a,e.number=n);return{args:["-activate",t,s,m||""],kwArgs:e}}case"-start":{(e.from==="Protean"||e.from==="Color Change")&&(e.from="ability:"+e.from);break}case"move":{e.from==="Magic Bounce"&&(e.from="ability: Magic Bounce");break}case"cant":{let[,t,r,a]=o;if(h.has(r))return{args:["-block",t,r,a,e.of||""],kwArgs:{}};break}case"-heal":{let t=c.parseEffect(e.from,p).name;b.has(t)&&(e.of="");break}case"gen":{let[,t]=o;return{args:["gen",Number(t)],kwArgs:{}}}case"-restoreboost":{o[0]="-clearnegativeboost";break}case"-nothing":o=["-activate","","move: Splash"]}return{args:o,kwArgs:e}}return f(T);})();
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _chunkSS3ZXIDKjs = require('../chunk-SS3ZXIDK.js');
var _chunkXXO6TZTOjs = require('../chunk-XXO6TZTO.js');

@@ -1408,3 +1408,3 @@ // src/verifier/index.ts

verify(data) {
for (const { roomid, args, kwArgs } of _chunkSS3ZXIDKjs.Protocol.parse(data)) {
for (const { roomid, args, kwArgs } of _chunkXXO6TZTOjs.Protocol.parse(data)) {
if (!verifyRoomID(roomid))

@@ -1418,3 +1418,3 @@ return data;

verifyLine(line) {
const parsed = _chunkSS3ZXIDKjs.Protocol.parseBattleLine(line);
const parsed = _chunkXXO6TZTOjs.Protocol.parseBattleLine(line);
if (!this.dispatch(parsed.args, parsed.kwArgs, false))

@@ -1426,6 +1426,6 @@ return parsed;

const handler = raw && this.raw ? this.raw : this.handler;
const key = _chunkSS3ZXIDKjs.Protocol.key(args, raw);
const key = _chunkXXO6TZTOjs.Protocol.key(args, raw);
if (!key || !handler[key])
return false;
if (Object.keys(kwArgs).length && !(key in _chunkSS3ZXIDKjs.Protocol.ARGS_WITH_KWARGS))
if (Object.keys(kwArgs).length && !(key in _chunkXXO6TZTOjs.Protocol.ARGS_WITH_KWARGS))
return false;

@@ -1432,0 +1432,0 @@ return handler[key](args, kwArgs);

{
"name": "@pkmn/protocol",
"version": "0.6.22",
"version": "0.6.23",
"description": "Parsing logic for Pokémon Showdown's PROTOCOL and SIM-PROTOCOL",

@@ -5,0 +5,0 @@ "repository": "github:pkmn/ps",

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

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