How to start coding notetags

Just to make things clear I'm not "flogging" I was nice enough to come here and extract code from my set of tools to show exactly how to extract noteags without actually needing to use the developer tools or a bundler.

To be clear on this, I have every respect for the fact that you've devoted much of your own time to making tools for this community and I have nothing against them or you.

But when your explanation starts out with "I do multi-line note-tags by using FeniXTools" and your code examples begin with "// Taken from https://fenixenginemv.gitlab.io/fenix-tools/Utils_filterText.js.html" this sounds a lot like saying the usual way of doing multi-line or custom notetags is to go and grab FeniX Tools to do it. Kinda like saying the best way to crop a photo is to do it in Adobe Photoshop Elements 2018 when any random image editor will do the job fine.

As you mentioned, it's only a 2 step process whether or not you use the functions included your suite of tools or type it up by hand in Atom/Notepad/whatever editor of your choice. Read the string > chop up the string. Referring to external tools is excessively over-complicating it I feel.

Those tools may make life easier for newbies or advanced coders, but if they're not comfortable with parsing strings yet and assume that notetags are "made in plugins", I'm not sure I would even consider them a newbie coder yet.
It would be no different if I were to reference Yanfly. If instead I said "I do mine the same way Yanfly does theirs", and then proceeded to demonstrate code from Yanfly with the proper credits on the top of the code example like this "// Taken from Yanfly's Plugin http://" then I bet you there would not have been an issue here

Weather it's a plugin that is being referenced or a set of tools being referenced, it still demonstrates how to extract notetags via code, what is being referenced or credited should not matter because a noob developer or an advanced developer can figure it out by looking at the examples given. How they discern and judge the information given, is up to them an not for you to flaunt "flogging" when you see it. Not only has this sort of derailed the topic it in no way helps the OP. What does help the OP is the code examples and URL's given and again how they want to proceed is up to them.

In the end it's not your job to mind read the OP just as it's not mine, I had no idea the level of knowledge the OP had, so I left behind code examples. The OP could've asked for more information, they could've asked how to do things step by step but instead they decided they could give the tools a try and ask me question regarding them, and since they already know about Rollup and Webpack my guess is they've used build tools before and if that's what they want to do, then that is up to them. Again the remark you made was unnecessary and was strictly to either prove a point or to stroke your ego, I don't care either way because I was here for the OP, and then came back to answer the questions they had left for me. Don't worry though I get where you're coming from and I can understand how it looks but let's just leave these remarks to ourselves because they in no way help anyone at all and it only makes me look like a spammer, flogging the forums with my tools that I have yet to officially advertises anywhere but their own website or twitter.
Like the others said, in the plugin you don't "make" notetags, you read them. Reading notetags from the database using the "meta" property is really easy. Here are a few examples.

Let's say you have an item that has the following notetags:
Spoiler
NotetagExample.png
Open the console (F8) during playtest, and view the properties by accessing the "meta" property of the data object.

Spoiler
Console.png

Let's go through each of these in detail:

1.) Notetag in the format of <name>
This will add a property to "meta" with a value of true (boolean true)
You can check for it similar to this:
Code:
if ($dataItems[1].meta.healing) {
   // do stuff
}

2.) Notetag in the format of <name:string>
This will add a property to "meta" with a value of the string

2a.)
Code:
<expensive:false>
This will add a property called "expensive" with a value of "false" (string false).
I would not recommend doing this, because if you check for it like in the first example, it will actually pass the test (because any non-empty string is truthy). However, if you wanted to do it this way, then your check would have to be more explicit.
Code:
if ($dataItems[1].meta.expensive === "false") {
   // do stuff
}

2b.)
Code:
<races:orc,dwarf,elf>
This will add a property called "races" with a value of "orc,dwarf,elf" (string).
If you want to convert it to an array, you can use the string method 'split'.
Code:
const raceArray = $dataItems[1].meta.races.split(',');
if (raceArray.includes('elf') {
   // do stuff
}

2c.)
Code:
<recipe:1,5,9>
This will add a property called "recipe" with a value of "1,5,9" (string).
If you want to convert it to an array of numbers, you can use the 'split' and 'map' + 'parseInt' methods.
Code:
const recipeArray = $dataItems[1].meta.recipe.split(',').map(num => parseInt(num));
if (recipeArray.every(ingredient => $gameParty.hasItem($dataItems[ingredient])) {
   // do stuff
}
@Traverse -- Thank you for opening my eyes to the fact that this is even a built-in thing.

@Aloe Guvner -- Thank you for the ridiculously straight forward real world applications/code.

@LTN Games -- I think you had a real missed opportunity here:
flogging the forums with my tools that I have yet to officially advertises anywhere but their own website or twitter.

If you would have instead structured this line like this:
flogging the forums with my tools that I have yet to officially advertises anywhere but their own website as seen here or twitter people can follow here.
I would have literally rolled on the floor laughing my arse off. Just saying.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-start-coding-notetags.98965/