🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

to
2.0.1

.idea/codeStyles/codeStyleConfig.xml

2

package.json
{
"name": "strikethrough-js",
"version": "2.0.0",
"version": "2.0.1",
"description": "Manipulate strikethrough chars in Javascript",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -1,6 +0,10 @@

# StrikethroughJS
Manipulate plain text strikethrough chars in Javascript.
<div align="center">
<img src="https://i.imgur.com/5260wcO.gif" width="400" alt="strikethrough-js" />
</div>
<br />
<p align="center">Manipulate plain text strikethrough chars in Javascript</p>
<p align="center">
<a href="https://badge.fury.io/js/strikethrough-js"><img src="https://badge.fury.io/js/strikethrough-js.svg" alt="npm version" height="20"></a>
</p>
[![npm version](https://badge.fury.io/js/strikethrough-js.svg)](https://badge.fury.io/js/strikethrough-js)
## Why?

@@ -12,3 +16,3 @@ > Strikethrough is represented by words with a horizontal line through their center. It implies that the text is wrong and was recently deleted or marked as such. Unlike the HTML's tag, strikethrough text will work when you copy-paste it in to another location. That’s because the strikethrough characters [...] are in plain text. - [Saijo George](https://saijogeorge.com/strikethrough-text-generator/)

## Install
```npm
```sh
npm i strikethrough-js

@@ -19,15 +23,14 @@ ```

```javascript
// Javascript
var lib = require('strikethrough-js');
var res = lib.removeStrikethrough('...');
// ES5-6
import * as lib from 'strikethrough-js';
const res = lib.removeStrikethrough('...');
```
```javascript
import {
removeStrikethrough
} from 'strikethrough-js';
var res = removeStrikethrough('...');
```
### Remove strikethrough
```javascript
var str = removeStrikethrough('1̶2̶3̶7̶8̶9̶€̶');
const str = removeStrikethrough('1̶2̶3̶7̶8̶9̶€̶');
console.log(str);

@@ -39,3 +42,3 @@ // 123789€

```javascript
var str = removeStrikethroughChars('456€ 1̶2̶3̶7̶8̶9̶€̶');
const str = removeStrikethroughChars('456€ 1̶2̶3̶7̶8̶9̶€̶');
console.log(str);

@@ -47,3 +50,3 @@ // 456€

```javascript
var str = getStrikethroughChars('456€ (1̶2̶3̶7̶8̶9̶€̶)');
const str = getStrikethroughChars('456€ (1̶2̶3̶7̶8̶9̶€̶)');
console.log(str);

@@ -55,3 +58,3 @@ // ["1̶", "2̶", "3̶", "7̶", "8̶", "9̶", "€̶"]

```javascript
var str = getStrikethroughString('456€ (1̶2̶3̶7̶8̶9̶€̶)');
const str = getStrikethroughString('456€ (1̶2̶3̶7̶8̶9̶€̶)');
console.log(str);

@@ -63,3 +66,3 @@ // 1̶2̶3̶7̶8̶9̶€̶

```javascript
var str = getChars('456€ (1̶2̶3̶7̶8̶9̶€̶)');
const str = getChars('456€ (1̶2̶3̶7̶8̶9̶€̶)');
console.log(str);

@@ -71,3 +74,3 @@ // ["1", "2", "3", "7", "8", "9", "€"]

```javascript
var str = getString('456€ (1̶2̶3̶7̶8̶9̶€̶)');
const str = getString('456€ (1̶2̶3̶7̶8̶9̶€̶)');
console.log(str);

@@ -77,3 +80,7 @@ // 123789€

## Testing
## Develop
### Library
Since this `lib` is pretty light, there is no need for a sophisticated bundler (like Webpack or Rollup). The core `lib` is bundled with bare bones [NodeJS](https://nodejs.org/en/) and [Babel](https://babeljs.io/).
### Tests
```npm

@@ -80,0 +87,0 @@ npm t

Sorry, the diff of this file is not supported yet