ovr 7.0.0-next.3 → 7.0.0-next.4
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/CHANGELOG.md +6 -0
- package/dist/util/index.d.ts +2 -2
- package/dist/util/index.js +3 -3
- package/package.json +1 -1
- package/src/util/index.ts +3 -3
package/CHANGELOG.md
CHANGED
package/dist/util/index.d.ts
CHANGED
|
@@ -198,8 +198,8 @@ export declare class Time {
|
|
|
198
198
|
export declare class Prose {
|
|
199
199
|
/**
|
|
200
200
|
* Joins parts of a description into sentences. A part without its own
|
|
201
|
-
* end gets a period before the next, and
|
|
202
|
-
*
|
|
201
|
+
* end gets a period before the next, and parts joined end as a sentence.
|
|
202
|
+
* A single part is kept as written.
|
|
203
203
|
*
|
|
204
204
|
* @param parts Parts, empty ones skipped
|
|
205
205
|
* @returns The description, or an empty string
|
package/dist/util/index.js
CHANGED
|
@@ -337,8 +337,8 @@ export class Time {
|
|
|
337
337
|
export class Prose {
|
|
338
338
|
/**
|
|
339
339
|
* Joins parts of a description into sentences. A part without its own
|
|
340
|
-
* end gets a period before the next, and
|
|
341
|
-
*
|
|
340
|
+
* end gets a period before the next, and parts joined end as a sentence.
|
|
341
|
+
* A single part is kept as written.
|
|
342
342
|
*
|
|
343
343
|
* @param parts Parts, empty ones skipped
|
|
344
344
|
* @returns The description, or an empty string
|
|
@@ -347,7 +347,7 @@ export class Prose {
|
|
|
347
347
|
const given = parts.filter((part) => Boolean(part));
|
|
348
348
|
const ended = (part) => /[.!?]$/.test(part);
|
|
349
349
|
let joined = given.reduce((text, part) => text ? `${text}${ended(text) ? "" : "."} ${part}` : part, "");
|
|
350
|
-
if (given.
|
|
350
|
+
if (given.length > 1 && !ended(joined))
|
|
351
351
|
joined += ".";
|
|
352
352
|
return joined;
|
|
353
353
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ovr",
|
|
3
3
|
"description": "Web apps anyone can use. Each route serves people a page and agents Markdown and MCP tools, with forms, Postgres, and passkey sign-in built in.",
|
|
4
|
-
"version": "7.0.0-next.
|
|
4
|
+
"version": "7.0.0-next.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
package/src/util/index.ts
CHANGED
|
@@ -400,8 +400,8 @@ export class Time {
|
|
|
400
400
|
export class Prose {
|
|
401
401
|
/**
|
|
402
402
|
* Joins parts of a description into sentences. A part without its own
|
|
403
|
-
* end gets a period before the next, and
|
|
404
|
-
*
|
|
403
|
+
* end gets a period before the next, and parts joined end as a sentence.
|
|
404
|
+
* A single part is kept as written.
|
|
405
405
|
*
|
|
406
406
|
* @param parts Parts, empty ones skipped
|
|
407
407
|
* @returns The description, or an empty string
|
|
@@ -414,7 +414,7 @@ export class Prose {
|
|
|
414
414
|
text ? `${text}${ended(text) ? "" : "."} ${part}` : part,
|
|
415
415
|
"",
|
|
416
416
|
);
|
|
417
|
-
if (given.
|
|
417
|
+
if (given.length > 1 && !ended(joined)) joined += ".";
|
|
418
418
|
return joined;
|
|
419
419
|
}
|
|
420
420
|
}
|