@themezernx/target-parser
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -10,1 +10,2 @@ export declare const stripExtension: (string: string) => string; | ||
export declare const toTheme: (string: string) => string | null; | ||
export declare const toTitleId: (string: string) => string | null; |
"use strict"; | ||
exports.__esModule = true; | ||
exports.toTheme = exports.toNice = exports.toWeb = exports.toTarget = exports.isTheme = exports.isNice = exports.isWeb = exports.isTarget = exports.stripExtension = void 0; | ||
exports.toTitleId = exports.toTheme = exports.toNice = exports.toWeb = exports.toTarget = exports.isTheme = exports.isNice = exports.isWeb = exports.isTarget = exports.stripExtension = void 0; | ||
var menuNames = [ | ||
{ | ||
target: "common", | ||
nice: "Home Menu Common" | ||
nice: "Home Menu Common", | ||
titleId: "0100000000001000" | ||
}, | ||
@@ -13,3 +14,4 @@ { | ||
web: "homemenu", | ||
nice: "Home Menu" | ||
nice: "Home Menu", | ||
titleId: "0100000000001000" | ||
}, | ||
@@ -20,3 +22,4 @@ { | ||
web: "lockscreen", | ||
nice: "Lockscreen" | ||
nice: "Lockscreen", | ||
titleId: "0100000000001000" | ||
}, | ||
@@ -27,3 +30,4 @@ { | ||
web: "userpage", | ||
nice: "User Page" | ||
nice: "User Page", | ||
titleId: "0100000000001013" | ||
}, | ||
@@ -34,3 +38,4 @@ { | ||
web: "allapps", | ||
nice: "All Apps" | ||
nice: "All Apps", | ||
titleId: "0100000000001000" | ||
}, | ||
@@ -41,3 +46,4 @@ { | ||
web: "settings", | ||
nice: "Settings" | ||
nice: "Settings", | ||
titleId: "0100000000001000" | ||
}, | ||
@@ -48,3 +54,4 @@ { | ||
web: "news", | ||
nice: "News" | ||
nice: "News", | ||
titleId: "0100000000001000" | ||
}, | ||
@@ -55,3 +62,4 @@ { | ||
web: "playerselect", | ||
nice: "Player Select" | ||
nice: "Player Select", | ||
titleId: "0100000000001007" | ||
}, | ||
@@ -99,1 +107,11 @@ ]; | ||
exports.toTheme = toTheme; | ||
var toTitleId = function (string) { | ||
var _a; | ||
return (_a = menuNames.find(function (menu) { | ||
return menu.target === exports.stripExtension(string) || | ||
menu.theme === string || | ||
menu.web === string || | ||
menu.nice === string; | ||
})) === null || _a === void 0 ? void 0 : _a.titleId; | ||
}; | ||
exports.toTitleId = toTitleId; |
{ | ||
"name": "@themezernx/target-parser", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A small library that converts menu names from layouts, themes and `SZS` files. ", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/ThemezerNX/TargetParser", |
@@ -12,2 +12,3 @@ # Target Parser | ||
- `ResidentMenu.szs` (target): same as above. | ||
- `0100000000001000` (titleId): the internal system title that the menu is stored in. | ||
@@ -14,0 +15,0 @@ # Build |
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
5669
119
23