From 387be70ae96e884dab468f73aaf776616b062d0b Mon Sep 17 00:00:00 2001 From: synix Date: Fri, 26 Apr 2024 11:49:52 +0800 Subject: [PATCH] make slice() function's doc more accurate --- src/types/YArray.js | 6 +++--- src/types/YXmlFragment.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/types/YArray.js b/src/types/YArray.js index 2afdb7e6..609247bd 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -162,9 +162,9 @@ export class YArray extends AbstractType { } /** - * Preppends content to this YArray. + * Prepends content to this YArray. * - * @param {Array} content Array of content to preppend. + * @param {Array} content Array of content to prepend. */ unshift (content) { this.insert(0, content) @@ -206,7 +206,7 @@ export class YArray extends AbstractType { } /** - * Transforms this YArray to a JavaScript Array. + * Returns a portion of this YArray into a JavaScript Array selected from start to end (end not included). * * @param {number} [start] * @param {number} [end] diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js index 2f37684a..16b54985 100644 --- a/src/types/YXmlFragment.js +++ b/src/types/YXmlFragment.js @@ -380,9 +380,9 @@ export class YXmlFragment extends AbstractType { } /** - * Preppends content to this YArray. + * Prepends content to this YArray. * - * @param {Array} content Array of content to preppend. + * @param {Array} content Array of content to prepend. */ unshift (content) { this.insert(0, content) @@ -399,7 +399,7 @@ export class YXmlFragment extends AbstractType { } /** - * Transforms this YArray to a JavaScript Array. + * Returns a portion of this YXmlFragment into a JavaScript Array selected from start to end (end not included). * * @param {number} [start] * @param {number} [end]