Gathering detailed insights and metrics for word-wrap
Gathering detailed insights and metrics for word-wrap
Gathering detailed insights and metrics for word-wrap
Gathering detailed insights and metrics for word-wrap
postcss-replace-overflow-wrap
PostCSS plugin to replace overflow-wrap with word-wrap or optionally retain both declarations.
@aashutoshrathi/word-wrap
Wrap words to a specified length.
jp-wrap
Japanese word wrap
react-native-wrapped-text
react native word wrap text component for support korean
npm install word-wrap
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
196 Stars
73 Commits
59 Forks
6 Watching
2 Branches
14 Contributors
Updated on 27 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-1.9%
6,914,176
Compared to previous day
Last week
3.8%
38,493,309
Compared to previous week
Last month
25.5%
148,887,693
Compared to previous month
Last year
-8.3%
1,245,582,548
Compared to previous year
2
Wrap words to a specified length.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
Install with npm:
1$ npm install --save word-wrap
1var wrap = require('word-wrap'); 2 3wrap('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.');
Results in:
Lorem ipsum dolor sit amet, consectetur adipiscing
elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
Type: Number
Default: 50
The width of the text before wrapping to a new line.
Example:
1wrap(str, {width: 60});
Type: String
Default: `` (two spaces)
The string to use at the beginning of each line.
Example:
1wrap(str, {indent: ' '});
Type: String
Default: \n
The string to use at the end of each line.
Example:
1wrap(str, {newline: '\n\n'});
Type: function
Default: function(str){return str;}
An escape function to run on each line after splitting them.
Example:
1var xmlescape = require('xml-escape'); 2wrap(str, { 3 escape: function(string){ 4 return xmlescape(string); 5 } 6});
Type: Boolean
Default: false
Trim trailing whitespace from the returned string. This option is included since .trim()
would also strip the leading indentation from the first line.
Example:
1wrap(str, {trim: true});
Type: Boolean
Default: false
Break a word between any two letters when the word is longer than the specified width.
Example:
1wrap(str, {cut: true});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
1$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
Commits | Contributor |
---|---|
47 | jonschlinkert |
7 | OlafConijn |
3 | doowb |
2 | aashutoshrathi |
2 | lordvlad |
2 | hildjj |
1 | danilosampaio |
1 | 2fd |
1 | leonard-thieu |
1 | mohd-akram |
1 | toddself |
1 | wolfgang42 |
1 | zachhale |
Jon Schlinkert
Copyright © 2023, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.8.0, on July 22, 2023.
The latest stable version of the package.
Stable Version
1
5.3/10
Summary
word-wrap vulnerable to Regular Expression Denial of Service
Affected Versions
< 1.2.4
Patched Versions
1.2.4
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 5/18 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More