Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

🐙 Truncate text and keeps urls safe.

NotificationsYou must be signed in to change notification settings

FGRibreau/node-truncate

Repository files navigation

CIDownloadsavailable-for-advisoryTwitter FollowGet help on CodementorSlack

Truncate text and keeps urls safe.

NPM

Install the module with:npm install truncate

❤️ Shameless plug

Usage

// BrowserString.truncate("1234 http://google.com hey :)",2)==="12…"
// NodeJS>truncate=require('truncate');>truncate("1234 http://google.com hey :)",4);"1234…">truncate("1234 http://google.com hey :)",4,{ellipsis:null});// or ellipsis:''"1234">truncate("1234 http://google.com hey :)",6);"1234 http://google.com…">truncate("1234 http://google.com hey :)",100);"1234 http://google.com hey :)"

Donate

I maintain this project in my free time, if it helped you please support my work viapaypal orbitcoins, thanks a lot!

License

Copyright (c) 2014 Francois-Guillaume RibreauLicensed under the MIT license.

About

🐙 Truncate text and keeps urls safe.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp