From 4c4eb79e06b3996daf2d4cd4c7a2cf10aef00d14 Mon Sep 17 00:00:00 2001 From: Duc Tai Ly Date: Fri, 16 Aug 2024 14:01:45 +0200 Subject: [PATCH] Change default product name and shortDescription --- lib/defaults.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/defaults.js b/lib/defaults.js index db361c7..c4c409b 100644 --- a/lib/defaults.js +++ b/lib/defaults.js @@ -9,6 +9,10 @@ const nameWithDot = (name) => { return regexWithRemoval(name.charAt(0)) + name.slice(1, name.length).replace(/[^a-zA-Z0-9]/g,'.'); } +const nameWithSpaces = (name) => { + return regexWithRemoval(name.charAt(0)) + name.slice(1, name.length).replace(/[^a-zA-Z0-9]/g,' '); +} + /** * Module containing default configuration for ORD Document. * @module defaults @@ -20,8 +24,8 @@ module.exports = { products: (name) => [ { ordId: `customer:product:${nameWithDot(name)}:`, - title: `ORD App Title for ${regexWithRemoval(name)}`, - shortDescription: " shortDescription for products", + title: nameWithSpaces(name), + shortDescription: nameWithSpaces(name), vendor: "customer:vendor:customer:", }, ],