You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
454 B
JavaScript
19 lines
454 B
JavaScript
3 years ago
|
"use strict";
|
||
|
|
||
|
const htmlEntities = require("html-entities");
|
||
|
|
||
|
module.exports = function normalizeProduct() {
|
||
|
return async function ({ data, createItem }) {
|
||
|
createItem({
|
||
|
id: `datasheet:st:${data.productId}`,
|
||
|
data: {
|
||
|
manufacturer: "STMicroelectronics",
|
||
|
productID: data.productId,
|
||
|
name: data.cellData["XJE010_VT-007"],
|
||
|
description: htmlEntities.decode(data.cellData["XJE014_VT-007"]),
|
||
|
url: data.datasheetLink
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
};
|