strikethrough-js
Advanced tools
Comparing version 3.0.2 to 3.0.3
{ | ||
"name": "strikethrough-js", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "Manipulate strikethrough characters in Javascript", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -17,3 +17,3 @@ <div align="center"> | ||
### An example | ||
It can be useful when some fonts don't support strikethrough text. Using this, you will be able to use "regular" text and then apply strikethrough another way (e.g., in CSS: `text-decoration: line-through;`). | ||
It can be useful when some fonts don't support strikethrough text. Using this, you will be able to use regular text and then apply strikethrough another way (e.g., in CSS: `text-decoration: line-through;`). | ||
@@ -39,14 +39,12 @@ ## Get started | ||
### `removeStrikethrough` | ||
Remove the strikethrough characters from your string and replace them by regular ones: | ||
Returns an equivalent `string` of regular text: | ||
```javascript | ||
const str = removeStrikethrough('1̶2̶3̶7̶8̶9̶€̶'); | ||
console.log(str); | ||
// 123789€ | ||
const str = removeStrikethrough('Price was 1̶2̶3̶7̶8̶9̶€̶'); | ||
// Price was 123789€ | ||
``` | ||
### `removeStrikethroughChars` | ||
Remove the strikethrough characters from your string: | ||
Returns a `string ` without strikethrough text: | ||
```javascript | ||
const str = removeStrikethroughChars('456€ 1̶2̶3̶7̶8̶9̶€̶'); | ||
console.log(str); | ||
// 456€ | ||
@@ -56,6 +54,5 @@ ``` | ||
### `getStrikethroughChars` | ||
Get a list of the strikethrough characters in your string: | ||
Returns a `string[]` of the strikethrough characters: | ||
```javascript | ||
const str = getStrikethroughChars('456€ (1̶2̶3̶7̶8̶9̶€̶)'); | ||
console.log(str); | ||
// ["1̶", "2̶", "3̶", "7̶", "8̶", "9̶", "€̶"] | ||
@@ -65,6 +62,5 @@ ``` | ||
### `getStrikethroughString` | ||
Get the strikethrough characters in your string: | ||
Returns a `string` of the strikethrough text: | ||
```javascript | ||
const str = getStrikethroughString('456€ (1̶2̶3̶7̶8̶9̶€̶)'); | ||
console.log(str); | ||
// 1̶2̶3̶7̶8̶9̶€̶ | ||
@@ -74,14 +70,12 @@ ``` | ||
### `getChars` | ||
Get a list of the strikethrough characters of your string, but regular ones: | ||
Returns an equivalent `string[]` of the strikethrough characters: | ||
```javascript | ||
const str = getChars('456€ (1̶2̶3̶7̶8̶9̶€̶)'); | ||
console.log(str); | ||
// ["1", "2", "3", "7", "8", "9", "€"] | ||
``` | ||
### `getChars` | ||
Get the strikethrough characters of your string, but regular ones: | ||
### `getString` | ||
Returns an equivalent `string` of the strikethrough characters: | ||
```javascript | ||
const str = getString('456€ (1̶2̶3̶7̶8̶9̶€̶)'); | ||
console.log(str); | ||
// 123789€ | ||
@@ -88,0 +82,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
8585
88