🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

pantsu

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pantsu - npm Package Compare versions

Comparing version
1.1.0
to
1.2.0
+1
-1
dist/index.js

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

var n=/*#__PURE__*/function(){function n(){}return n.equalsIgnoreCase=function(n,t){return(null==n?void 0:n.toLowerCase())==(null==t?void 0:t.toLowerCase())},n.validJSON=function(n){if(!n)return!1;try{return JSON.parse(n),!0}catch(n){return!1}},n}(),t=/*#__PURE__*/function(){function n(){}return n.splitPath=function(n){var t,r,e;return null==(t=new URL(n))||null==(r=t.pathname)||null==(e=r.split("/"))?void 0:e.filter(Boolean)},n}();exports.StringUtils=n,exports.UrlUtils=t;
var n=/*#__PURE__*/function(){function n(){}return n.equalsIgnoreCase=function(n,r){return(null==n?void 0:n.toLowerCase())==(null==r?void 0:r.toLowerCase())},n.includesIgnoreCase=function(n,r){var t;return null==n||null==(t=n.toLowerCase())?void 0:t.includes(null==r?void 0:r.toLowerCase())},n.validJSON=function(n){if(!n)return!1;try{return JSON.parse(n),!0}catch(n){return!1}},n}(),r=/*#__PURE__*/function(){function n(){}return n.splitPath=function(n){var r,t,e;return null==(r=new URL(n))||null==(t=r.pathname)||null==(e=t.split("/"))?void 0:e.filter(Boolean)},n}();exports.StringUtils=n,exports.UrlUtils=r;
//# sourceMappingURL=index.js.map

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

{"version":3,"file":"index.js","sources":["../src/StringUtils.ts","../src/UrlUtils.ts"],"sourcesContent":["/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\nexport default class StringUtils {\n public static equalsIgnoreCase(str1: string, str2: string): boolean {\n return str1?.toLowerCase() == str2?.toLowerCase();\n }\n\n /**\n * Checks if the string could be parsed as JSON.\n */\n public static validJSON(str: string) {\n if (!str) return false;\n\n try {\n JSON.parse(str);\n return true;\n } catch (error) {\n return false;\n }\n }\n}\n","export default class UrlUtils {\n public static splitPath(url: string | URL) {\n return new URL(url)?.pathname?.split(\"/\")?.filter(Boolean);\n }\n}\n"],"names":["StringUtils","equalsIgnoreCase","str1","str2","toLowerCase","validJSON","str","JSON","parse","error","UrlUtils","splitPath","url","_URL","_URL$pathname","_URL$pathname$split","URL","pathname","split","filter","Boolean"],"mappings":"AAIqBA,IAAAA,eACHC,WAAAA,SAAAA,IAAAA,QAAAA,EAAAA,iBAAP,SAAwBC,EAAcC,GACzC,OAAO,MAAAD,OAAA,EAAAA,EAAME,iBAAN,MAAuBD,OAAvB,EAAuBA,EAAMC,cACvC,EAKaC,EAAAA,UAAP,SAAiBC,GACpB,IAAKA,EAAK,OAAA,EAEV,IAEI,OADAC,KAAKC,MAAMF,IACJ,CAGV,CAFC,MAAOG,GACL,OACH,CAAA,CACJ,IAhBaR,GCLGS,eACHC,WAAAA,SAAAA,IAAAA,QAAAA,EAAAA,UAAP,SAAiBC,GACpB,IAAAC,EAAAC,EAAAC,EAAA,OAAO,OAAPF,EAAO,IAAIG,IAAIJ,KAAf,OAAOE,EAAAD,EAAcI,WAArB,OAAAF,EAAOD,EAAwBI,MAAM,WAA9B,EAAAH,EAAoCI,OAAOC,QACrD,IAFaT"}
{"version":3,"file":"index.js","sources":["../src/StringUtils.ts","../src/UrlUtils.ts"],"sourcesContent":["/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\nexport default class StringUtils {\n public static equalsIgnoreCase(str1: string, str2: string): boolean {\n return str1?.toLowerCase() == str2?.toLowerCase();\n }\n\n public static includesIgnoreCase(source: string, includes: string) {\n return source?.toLowerCase()?.includes(includes?.toLowerCase());\n }\n\n /**\n * Checks if the string could be parsed as JSON.\n */\n public static validJSON(str: string) {\n if (!str) return false;\n\n try {\n JSON.parse(str);\n return true;\n } catch (error) {\n return false;\n }\n }\n}\n","/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\nexport default class UrlUtils {\n /**\n * Splits the URL path into its segments.\n * @returns Array with path parts.\n */\n public static splitPath(url: string | URL) {\n return new URL(url)?.pathname?.split(\"/\")?.filter(Boolean);\n }\n}\n"],"names":["StringUtils","equalsIgnoreCase","str1","str2","toLowerCase","includesIgnoreCase","source","includes","_source$toLowerCase","validJSON","str","JSON","parse","error","UrlUtils","splitPath","url","_URL","_URL$pathname","_URL$pathname$split","URL","pathname","split","filter","Boolean"],"mappings":"AAIqBA,IAAAA,iDACHC,iBAAP,SAAwBC,EAAcC,GACzC,aAAOD,OAAAA,EAAAA,EAAME,iBAAiBD,MAAAA,OAAAA,EAAAA,EAAMC,cACvC,IAEaC,mBAAP,SAA0BC,EAAgBC,GAAgB,IAAAC,EAC7D,OAAA,MAAAF,GAAO,OAAPE,EAAOF,EAAQF,oBAAf,EAAOI,EAAuBD,SAASA,MAAAA,OAAAA,EAAAA,EAAUH,cACpD,IAKaK,UAAP,SAAiBC,GACpB,IAAKA,EAAK,OAAO,EAEjB,IAEI,OADAC,KAAKC,MAAMF,IACJ,CAGV,CAFC,MAAOG,GACL,QACH,CACJ,OCrBgBC,eAKHC,WAAAA,SAAAA,IAAAA,QAAAA,EAAAA,UAAP,SAAiBC,GACpB,IAAAC,EAAAC,EAAAC,EAAA,OAAO,OAAPF,EAAO,IAAIG,IAAIJ,KAAf,OAAOE,EAAAD,EAAcI,WAArB,OAAAF,EAAOD,EAAwBI,MAAM,WAA9B,EAAAH,EAAoCI,OAAOC,QACrD,IAFaT"}

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

var n=/*#__PURE__*/function(){function n(){}return n.equalsIgnoreCase=function(n,t){return(null==n?void 0:n.toLowerCase())==(null==t?void 0:t.toLowerCase())},n.validJSON=function(n){if(!n)return!1;try{return JSON.parse(n),!0}catch(n){return!1}},n}(),t=/*#__PURE__*/function(){function n(){}return n.splitPath=function(n){var t,r,e;return null==(t=new URL(n))||null==(r=t.pathname)||null==(e=r.split("/"))?void 0:e.filter(Boolean)},n}();export{n as StringUtils,t as UrlUtils};
var n=/*#__PURE__*/function(){function n(){}return n.equalsIgnoreCase=function(n,e){return(null==n?void 0:n.toLowerCase())==(null==e?void 0:e.toLowerCase())},n.includesIgnoreCase=function(n,e){var r;return null==n||null==(r=n.toLowerCase())?void 0:r.includes(null==e?void 0:e.toLowerCase())},n.validJSON=function(n){if(!n)return!1;try{return JSON.parse(n),!0}catch(n){return!1}},n}(),e=/*#__PURE__*/function(){function n(){}return n.splitPath=function(n){var e,r,t;return null==(e=new URL(n))||null==(r=e.pathname)||null==(t=r.split("/"))?void 0:t.filter(Boolean)},n}();export{n as StringUtils,e as UrlUtils};
//# sourceMappingURL=index.module.js.map

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

{"version":3,"file":"index.module.js","sources":["../src/StringUtils.ts","../src/UrlUtils.ts"],"sourcesContent":["/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\nexport default class StringUtils {\n public static equalsIgnoreCase(str1: string, str2: string): boolean {\n return str1?.toLowerCase() == str2?.toLowerCase();\n }\n\n /**\n * Checks if the string could be parsed as JSON.\n */\n public static validJSON(str: string) {\n if (!str) return false;\n\n try {\n JSON.parse(str);\n return true;\n } catch (error) {\n return false;\n }\n }\n}\n","export default class UrlUtils {\n public static splitPath(url: string | URL) {\n return new URL(url)?.pathname?.split(\"/\")?.filter(Boolean);\n }\n}\n"],"names":["StringUtils","equalsIgnoreCase","str1","str2","toLowerCase","validJSON","str","JSON","parse","error","UrlUtils","splitPath","url","_URL","_URL$pathname","_URL$pathname$split","URL","pathname","split","filter","Boolean"],"mappings":"AAIqBA,IAAAA,eACHC,WAAAA,SAAAA,IAAAA,QAAAA,EAAAA,iBAAP,SAAwBC,EAAcC,GACzC,OAAO,MAAAD,OAAA,EAAAA,EAAME,iBAAN,MAAuBD,OAAvB,EAAuBA,EAAMC,cACvC,EAKaC,EAAAA,UAAP,SAAiBC,GACpB,IAAKA,EAAK,OAAA,EAEV,IAEI,OADAC,KAAKC,MAAMF,IACJ,CAGV,CAFC,MAAOG,GACL,OACH,CAAA,CACJ,IAhBaR,GCLGS,eACHC,WAAAA,SAAAA,IAAAA,QAAAA,EAAAA,UAAP,SAAiBC,GACpB,IAAAC,EAAAC,EAAAC,EAAA,OAAO,OAAPF,EAAO,IAAIG,IAAIJ,KAAf,OAAOE,EAAAD,EAAcI,WAArB,OAAAF,EAAOD,EAAwBI,MAAM,WAA9B,EAAAH,EAAoCI,OAAOC,QACrD,IAFaT"}
{"version":3,"file":"index.module.js","sources":["../src/StringUtils.ts","../src/UrlUtils.ts"],"sourcesContent":["/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\nexport default class StringUtils {\n public static equalsIgnoreCase(str1: string, str2: string): boolean {\n return str1?.toLowerCase() == str2?.toLowerCase();\n }\n\n public static includesIgnoreCase(source: string, includes: string) {\n return source?.toLowerCase()?.includes(includes?.toLowerCase());\n }\n\n /**\n * Checks if the string could be parsed as JSON.\n */\n public static validJSON(str: string) {\n if (!str) return false;\n\n try {\n JSON.parse(str);\n return true;\n } catch (error) {\n return false;\n }\n }\n}\n","/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/. */\n\nexport default class UrlUtils {\n /**\n * Splits the URL path into its segments.\n * @returns Array with path parts.\n */\n public static splitPath(url: string | URL) {\n return new URL(url)?.pathname?.split(\"/\")?.filter(Boolean);\n }\n}\n"],"names":["StringUtils","equalsIgnoreCase","str1","str2","toLowerCase","includesIgnoreCase","source","includes","_source$toLowerCase","validJSON","str","JSON","parse","error","UrlUtils","splitPath","url","_URL","_URL$pathname","_URL$pathname$split","URL","pathname","split","filter","Boolean"],"mappings":"AAIqBA,IAAAA,iDACHC,iBAAP,SAAwBC,EAAcC,GACzC,aAAOD,OAAAA,EAAAA,EAAME,iBAAiBD,MAAAA,OAAAA,EAAAA,EAAMC,cACvC,IAEaC,mBAAP,SAA0BC,EAAgBC,GAAgB,IAAAC,EAC7D,OAAA,MAAAF,GAAO,OAAPE,EAAOF,EAAQF,oBAAf,EAAOI,EAAuBD,SAASA,MAAAA,OAAAA,EAAAA,EAAUH,cACpD,IAKaK,UAAP,SAAiBC,GACpB,IAAKA,EAAK,OAAO,EAEjB,IAEI,OADAC,KAAKC,MAAMF,IACJ,CAGV,CAFC,MAAOG,GACL,QACH,CACJ,OCrBgBC,eAKHC,WAAAA,SAAAA,IAAAA,QAAAA,EAAAA,UAAP,SAAiBC,GACpB,IAAAC,EAAAC,EAAAC,EAAA,OAAO,OAAPF,EAAO,IAAIG,IAAIJ,KAAf,OAAOE,EAAAD,EAAcI,WAArB,OAAAF,EAAOD,EAAwBI,MAAM,WAA9B,EAAAH,EAAoCI,OAAOC,QACrD,IAFaT"}
export default class StringUtils {
static equalsIgnoreCase(str1: string, str2: string): boolean;
static includesIgnoreCase(source: string, includes: string): boolean;
/**

@@ -4,0 +5,0 @@ * Checks if the string could be parsed as JSON.

export default class UrlUtils {
/**
* Splits the URL path into its segments.
* @returns Array with path parts.
*/
static splitPath(url: string | URL): string[];
}
{
"name": "pantsu",
"description": "Utilities for JS projects",
"version": "1.1.0",
"version": "1.2.0",
"license": "MPL-2.0",

@@ -6,0 +6,0 @@ "packageManager": "pnpm@7.9.3",