content-entry-transform 1.0.0 → 1.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "content-entry-transform",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,6 +1,14 @@
1
- export function createPropertiesTransformer(propertyDefinitions, match) {
1
+
2
+ /**
3
+ * Creates a new transformer.
4
+ * On match the enrtry will be assigned noe properties as given by propertyDefinitions.
5
+ * @param {Object} propertyDefinitions
6
+ * @param {Matcher} matcher
7
+ * @return {Transformer}
8
+ */
9
+ export function createPropertiesTransformer(propertyDefinitions, match, name="property") {
2
10
  return {
3
- name: "property",
11
+ name,
4
12
  match,
5
13
  transform: async entry => Object.create(entry, propertyDefinitions)
6
14
  };