Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added String.truncate #4110

Open
wants to merge 5 commits into
base: next-minor
Choose a base branch
from

Conversation

jessekelly881
Copy link
Contributor

@jessekelly881 jessekelly881 commented Dec 10, 2024

Closes #4103

Copy link

changeset-bot bot commented Dec 10, 2024

🦋 Changeset detected

Latest commit: 70b6f09

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 34 packages
Name Type
effect Minor
@effect/cli Major
@effect/cluster-browser Major
@effect/cluster-node Major
@effect/cluster-workflow Major
@effect/cluster Major
@effect/experimental Major
@effect/opentelemetry Major
@effect/platform-browser Major
@effect/platform-bun Major
@effect/platform-node-shared Major
@effect/platform-node Major
@effect/platform Major
@effect/printer-ansi Major
@effect/printer Major
@effect/rpc-http Major
@effect/rpc Major
@effect/sql-clickhouse Major
@effect/sql-d1 Major
@effect/sql-drizzle Major
@effect/sql-kysely Major
@effect/sql-libsql Major
@effect/sql-mssql Major
@effect/sql-mysql2 Major
@effect/sql-pg Major
@effect/sql-sqlite-bun Major
@effect/sql-sqlite-node Major
@effect/sql-sqlite-react-native Major
@effect/sql-sqlite-wasm Major
@effect/sql Major
@effect/typeclass Major
@effect/vitest Major
@effect/ai Major
@effect/ai-openai Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot changed the base branch from main to next-minor December 10, 2024 10:21
export const truncate: {
(
str: string,
lengthOrOptions:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just have an options object instead of a union. Also the member should be readonly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@github-actions github-actions bot force-pushed the next-minor branch 13 times, most recently from fe68352 to 7368257 Compare December 13, 2024 06:11
@github-actions github-actions bot force-pushed the next-minor branch 3 times, most recently from cfe8926 to 1e2ee13 Compare December 13, 2024 15:23
return str
}

let subString = str.slice(0, options.length)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The omission length should be considered too.

@github-actions github-actions bot force-pushed the next-minor branch 2 times, most recently from 37c2d0e to ce6e7df Compare December 15, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting on Author
Development

Successfully merging this pull request may close these issues.

2 participants