mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 19:25:23 +00:00
Strict mode-fixes
This commit is contained in:
@@ -11,7 +11,7 @@ import { sep } from "path";
|
||||
* @returns {Boolean} True if valid rgb, false otherwise
|
||||
*/
|
||||
|
||||
export function isValidRGB(value: string): boolean {
|
||||
export function isValidRGB(value?: string): boolean {
|
||||
if (!value || typeof value !== "string") {
|
||||
return false;
|
||||
}
|
||||
@@ -89,8 +89,10 @@ export function generateStringFile(lang: { [index: string]: string }): Buffer {
|
||||
* @param origin
|
||||
*/
|
||||
|
||||
export function splitBufferBundle(origin: Object): [PartitionedBundle["l10nBundle"], PartitionedBundle["bundle"]] {
|
||||
return Object.keys(origin).reduce(([ l10n, bundle ], current) => {
|
||||
type PartitionedBundleElements = [PartitionedBundle["l10nBundle"], PartitionedBundle["bundle"]];
|
||||
|
||||
export function splitBufferBundle(origin: any): PartitionedBundleElements {
|
||||
return Object.keys(origin).reduce<PartitionedBundleElements>(([ l10n, bundle ], current) => {
|
||||
if (!current.includes(".lproj")) {
|
||||
return [ l10n, { ...bundle, [current]: origin[current] }];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user