Closed kevinb456 closed 5 years ago
Copying this over from another issue
Also cope with upper-case versions of the units (except for M/m), and 'MEG'. Full list:
- M / MEG / meg / Meg for 10^6
- k / K for 10^3
- 'R' for resistors for 10^0
- m for 10^-3
- U / u / μ for 10^-6
- N / n for 10^-9
- P / p for 10^-12
Also saw "1n5F"
Splitting this up / marking as duplicated for
And lastly trying to address leaving off the units in bom-builder rather than here: https://github.com/kitspace/bom-builder/issues/35
Few aspects noted which BOM builder and Electro grammer don't cope with;
doesn't cope with upper case 'K', instead of just 'k', and 'N' instead of 'n' are most common, but probably others.
doesn't cope with "6V3" instead of "6.3V" which is very common, same for other specifications e.g. capacitances and inductances
doesn't cope with the 'F' being missed off of capacitances e.g. "4.7u" instead of "4.7uF".
end result being, should be able to cope with "16N8" and "16.8n" and other permutations.
Need to be careful, because some don't want to be case insensitive e.g. 'm' and 'M' are very different!