Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strikethrough-js

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strikethrough-js - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

package.json
{
"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 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc