From ae653b073626c88dfdb688fc900744a391f551b9 Mon Sep 17 00:00:00 2001 From: Lucas Brandstaetter Date: Sat, 7 Dec 2019 13:58:48 +0100 Subject: [PATCH 1/5] Update README for is.convert Make it clear that is.convert does not validate the parameters passed to the created function. --- readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/readme.md b/readme.md index 7d53629..b0d1dc9 100644 --- a/readme.md +++ b/readme.md @@ -90,6 +90,9 @@ Create a test function from `test`, that can later be called with a `node`, Useful if you’re going to test many nodes, for example when creating a utility where something else passes an is-compatible test. +_The function created with `is.convert` does not validate any of the parameters +with which it is called. Invalid values for `node`, `index` or `parent` will pass silently._ + Can also be accessed with `require('unist-util-is/convert')`. For example: From 539f02ec5f8101a2313e93361e4c9c6429b9cfe5 Mon Sep 17 00:00:00 2001 From: Lucas Brandstaetter Date: Sat, 7 Dec 2019 14:08:51 +0100 Subject: [PATCH 2/5] Update editorconfig * Allow line breaks in markdown documents --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index c6c8b36..4a7ea30 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,6 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false From 3ace68a894c460752a50d9ce1f18c31e80bcebd9 Mon Sep 17 00:00:00 2001 From: Lucas Brandstaetter Date: Sat, 7 Dec 2019 14:09:12 +0100 Subject: [PATCH 3/5] Update readme Address linting for updated documentation. --- readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index b0d1dc9..cc50386 100644 --- a/readme.md +++ b/readme.md @@ -90,8 +90,9 @@ Create a test function from `test`, that can later be called with a `node`, Useful if you’re going to test many nodes, for example when creating a utility where something else passes an is-compatible test. -_The function created with `is.convert` does not validate any of the parameters -with which it is called. Invalid values for `node`, `index` or `parent` will pass silently._ +The function created with `is.convert` does not validate any of the parameters +with which it is called. +*Invalid values for `node`, `index` or `parent` will pass silently.* Can also be accessed with `require('unist-util-is/convert')`. From 6223323ac2a60e173350e72a0cedf62eb238fd0b Mon Sep 17 00:00:00 2001 From: Titus Date: Sun, 8 Dec 2019 19:02:37 +0100 Subject: [PATCH 4/5] Update .editorconfig --- .editorconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/.editorconfig b/.editorconfig index 4a7ea30..c6c8b36 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,3 @@ end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false From 5adfa9c31778595f89ab722bfa4c620b415960e6 Mon Sep 17 00:00:00 2001 From: Titus Date: Sun, 8 Dec 2019 19:04:44 +0100 Subject: [PATCH 5/5] Update readme.md --- readme.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index cc50386..975a22a 100644 --- a/readme.md +++ b/readme.md @@ -90,9 +90,8 @@ Create a test function from `test`, that can later be called with a `node`, Useful if you’re going to test many nodes, for example when creating a utility where something else passes an is-compatible test. -The function created with `is.convert` does not validate any of the parameters -with which it is called. -*Invalid values for `node`, `index` or `parent` will pass silently.* +The created function is slightly faster because it expects valid input only. +Therefore, passing invalid input, yields unexpected results. Can also be accessed with `require('unist-util-is/convert')`.