@softwear/latestcollectioncore 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -2
- package/dist/index.js +1 -5
- package/package.json +1 -1
- package/src/index.ts +0 -2
- package/test/applyPreferedPropertyMappings.spec.js +7 -1
- package/test/applyPropertyMapping.spec.js +6 -1
- package/src/applyPreferedPropertyMappings.ts +0 -7
- package/src/applyPropertyMapping.ts +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { default as applyPropertyMapping } from "./applyPropertyMapping";
|
|
2
|
-
export { default as applyPreferedPropertyMappings } from "./applyPreferedPropertyMappings";
|
|
3
1
|
export { default as buildPropertyMappingFn } from "./buildPropertyMappingFn";
|
|
4
2
|
export { default as ean13 } from "./ean13";
|
|
5
3
|
export { default as deepCopy } from "./deepCopy";
|
package/dist/index.js
CHANGED
|
@@ -17,11 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.hashBrand = exports.getPreferedPropertyMappings = exports.deepCopy = exports.ean13 = exports.buildPropertyMappingFn =
|
|
21
|
-
var applyPropertyMapping_1 = require("./applyPropertyMapping");
|
|
22
|
-
Object.defineProperty(exports, "applyPropertyMapping", { enumerable: true, get: function () { return __importDefault(applyPropertyMapping_1).default; } });
|
|
23
|
-
var applyPreferedPropertyMappings_1 = require("./applyPreferedPropertyMappings");
|
|
24
|
-
Object.defineProperty(exports, "applyPreferedPropertyMappings", { enumerable: true, get: function () { return __importDefault(applyPreferedPropertyMappings_1).default; } });
|
|
20
|
+
exports.hashBrand = exports.getPreferedPropertyMappings = exports.deepCopy = exports.ean13 = exports.buildPropertyMappingFn = void 0;
|
|
25
21
|
var buildPropertyMappingFn_1 = require("./buildPropertyMappingFn");
|
|
26
22
|
Object.defineProperty(exports, "buildPropertyMappingFn", { enumerable: true, get: function () { return __importDefault(buildPropertyMappingFn_1).default; } });
|
|
27
23
|
var ean13_1 = require("./ean13");
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { default as applyPropertyMapping } from "./applyPropertyMapping"
|
|
2
|
-
export { default as applyPreferedPropertyMappings } from "./applyPreferedPropertyMappings"
|
|
3
1
|
export { default as buildPropertyMappingFn } from "./buildPropertyMappingFn"
|
|
4
2
|
export { default as ean13 } from "./ean13"
|
|
5
3
|
export { default as deepCopy } from "./deepCopy"
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
const { deepCopy,
|
|
1
|
+
const { deepCopy, buildPropertyMappingFn, getPreferedPropertyMappings } = require("../dist/index")
|
|
2
2
|
const { expect } = require("chai")
|
|
3
3
|
|
|
4
|
+
const applyPreferedPropertyMappings = function (skus, activeConfig, metaBrandSetting, dataProviderBrandSetting, tenantBrandSetting) {
|
|
5
|
+
const allMappings = getPreferedPropertyMappings(activeConfig, metaBrandSetting, dataProviderBrandSetting, tenantBrandSetting)
|
|
6
|
+
const mapper = buildPropertyMappingFn(allMappings)
|
|
7
|
+
return skus.map(mapper)
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
const skus = [
|
|
5
11
|
{
|
|
6
12
|
id: "1234567890128",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
const { deepCopy,
|
|
1
|
+
const { deepCopy, buildPropertyMappingFn } = require("../dist/index")
|
|
2
2
|
const { expect } = require("chai")
|
|
3
3
|
|
|
4
|
+
const applyPropertyMapping = function (skus, brands) {
|
|
5
|
+
const mapper = buildPropertyMappingFn(brands)
|
|
6
|
+
return skus.map(mapper)
|
|
7
|
+
}
|
|
8
|
+
|
|
4
9
|
const skus = [
|
|
5
10
|
{
|
|
6
11
|
id: "1234567890128",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { buildPropertyMappingFn, getPreferedPropertyMappings } from "./index"
|
|
2
|
-
|
|
3
|
-
export default function (skus, activeConfig, metaBrandSetting, dataProviderBrandSetting, tenantBrandSetting) {
|
|
4
|
-
const allMappings = getPreferedPropertyMappings(activeConfig, metaBrandSetting, dataProviderBrandSetting, tenantBrandSetting)
|
|
5
|
-
const mapper = buildPropertyMappingFn(allMappings)
|
|
6
|
-
return skus.map(mapper)
|
|
7
|
-
}
|