content-entry-transform 1.1.0 → 1.1.1

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/README.md CHANGED
@@ -8,5 +8,21 @@
8
8
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
9
9
  [![Known Vulnerabilities](https://snyk.io/test/github/arlac77/content-entry-transform/badge.svg)](https://snyk.io/test/github/arlac77/content-entry-transform)
10
10
  [![Coverage Status](https://coveralls.io/repos/arlac77/content-entry-transform/badge.svg)](https://coveralls.io/github/arlac77/content-entry-transform)
11
+
11
12
  # content-entry-transform
12
13
  transform content entries
14
+
15
+ # API
16
+
17
+
18
+ # install
19
+
20
+ With [npm](http://npmjs.org) do:
21
+
22
+ ```shell
23
+ npm install content-entry-transform
24
+ ```
25
+
26
+ # license
27
+
28
+ BSD-2-Clause
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "content-entry-transform",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,4 +1,3 @@
1
-
2
1
  /**
3
2
  * Creates a new transformer.
4
3
  * On match the enrtry will be assigned noe properties as given by propertyDefinitions.
@@ -6,7 +5,11 @@
6
5
  * @param {Matcher} matcher
7
6
  * @return {Transformer}
8
7
  */
9
- export function createPropertiesTransformer(propertyDefinitions, match, name="property") {
8
+ export function createPropertiesTransformer(
9
+ match,
10
+ propertyDefinitions,
11
+ name = "property"
12
+ ) {
10
13
  return {
11
14
  name,
12
15
  match,
package/src/transform.mjs CHANGED
@@ -12,7 +12,7 @@ export async function* transform(source, transformers = [], onlyMatching) {
12
12
  for await (let entry of source) {
13
13
  let didMatch = false;
14
14
  for (const t of transformers) {
15
- //console.log(t.name,entry.name,t.match(entry));
15
+ console.log(t.name, entry.name, t.match(entry));
16
16
  if (t.match(entry)) {
17
17
  didMatch = true;
18
18
  entry = await t.transform(entry);