Skip to content

Commit 92ec802

Browse files
refactor(docs): Add a banner to the README
1 parent 137dd6f commit 92ec802

7 files changed

+60
-50
lines changed

README.md

Lines changed: 48 additions & 44 deletions
Large diffs are not rendered by default.
Binary file not shown.
368 KB
Loading
-275 KB
Loading

src/appsscript/sheet/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export { appendRow } from "./appendRow";
4747
export { appendRows } from "./appendRows";
4848
export { convertRichTextToHtml } from "./convertRichTextToHtml";
4949
export { doGridRangesIntersect } from "./doGridRangesIntersect";
50+
export { extractRangeFromA1Notation } from "./extractRangeFromA1Notation";
51+
export { extractSheetNameFromA1Notation } from "./extractSheetNameFromA1Notation";
5052
export { getColumnIndexByLetter } from "./getColumnIndexByLetter";
5153
export { getColumnLetterByIndex } from "./getColumnLetterByIndex";
5254
export { getSheetById } from "./getSheetById";

src/appsscript/sheet/updateSheetNameInA1Notation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { parseA1Notation } from "./parseA1Notation";
99
* Updates or sets the sheet name within an A1 notation string, while preserving the range information (e.g., `A1:B2`).
1010
*
1111
* @param {string} a1Notation - The source A1 notation, which may or may not include a sheet name (e.g., `'Sheet Name'!A1:B2` or `A1:B2`).
12-
* @param {string | null} [sheetName] - The new sheet name to set.
12+
* @param {string|null} [sheetName] - The new sheet name to set.
1313
* Pass `null` or `undefined` to remove any existing sheet name and return only the range.
1414
* @returns {string} The new A1 notation string with the updated sheet name (e.g., `'New Sheet'!A1:B2` or just `A1:B2`).
1515
* @throws {@link IllegalArgumentException}

src/lang/base/isEmpty.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isString } from "@/lang";
1+
import { isString } from "../../lang";
22
import { objectToString } from "../object";
33
import { isNil } from "./isNil";
44
import { isObject } from "./isObject";
@@ -17,19 +17,23 @@ import { isObject } from "./isObject";
1717
* - Returns `false` for any other value, including numbers (even 0), booleans, functions,
1818
* or objects that are not empty according to the above rules.
1919
*
20-
* @param value - The value to check for emptiness.
21-
* @returns `true` if the value is empty; otherwise, `false`.
20+
* @param {unknown} value - The value to check for emptiness.
21+
* @param {boolean} [strict=false] - The strictness mode for string validation.
22+
* - If `false` (default), strings containing only whitespace characters (spaces, tabs, newlines)
23+
* are considered empty (using `trim()`). This is known as "blank" check.
24+
* - If `true`, only a string with zero length (`""`) is considered empty.
25+
* @returns {boolean} `true` if the value is empty; otherwise, `false`.
2226
* @see {@link nonEmpty}
2327
* @since 1.0.0
2428
* @version 1.1.0
2529
*/
26-
export function isEmpty(value: unknown): boolean {
30+
export function isEmpty(value: unknown, strict: boolean = false): boolean {
2731
if (isNil(value)) {
2832
return true;
2933
}
3034

3135
if (isString(value)) {
32-
return value.length === 0;
36+
return (strict ? value : value.trim()).length === 0;
3337
}
3438

3539
if (Array.isArray(value)) {

0 commit comments

Comments
 (0)