@takeda4dcs/text-ellipsis
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

execute-test workflow

@takeda4dcs/text-ellipsis

Table of contents

Functions

Functions

textEllipsisEnd

textEllipsisEnd(origin, length, ellipsis?): undefined | string

Clip the string from its end

Parameters

Name Type Default value Description
origin string undefined string to truncate
length number undefined length to trim - does not include the length of the ellipsis
ellipsis string DEFAULT_ELLIPSIS specify the ellipsis - default false '…'

Returns

undefined | string

clipped string

Defined in

index.ts:62


textEllipsisMiddle

textEllipsisMiddle(origin, length, ellipsis?, rear_longer?): undefined | string

Clip the string from its middle

Parameters

Name Type Default value Description
origin string undefined string to truncate
length number undefined length to trim - does not include the length of the ellipsis
ellipsis string DEFAULT_ELLIPSIS specify the ellipsis - default false '…'
rear_longer boolean false rear part be made longer if length is an odd number - default false

Returns

undefined | string

clipped string

Defined in

index.ts:12


textEllipsisStart

textEllipsisStart(origin, length, ellipsis?): undefined | string

Clip the string from its start

Parameters

Name Type Default value Description
origin string undefined string to truncate
length number undefined length to trim - does not include the length of the ellipsis
ellipsis string DEFAULT_ELLIPSIS specify the ellipsis - default false '…'

Returns

undefined | string

clipped string

Defined in

index.ts:40

Readme

Keywords

none

Package Sidebar

Install

npm i @takeda4dcs/text-ellipsis

Weekly Downloads

0

Version

0.1.4

License

MIT

Unpacked Size

10 kB

Total Files

7

Last publish

Collaborators

  • takeda4dcs