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 2.0.2 to 2.0.3

48

lib/index.js

@@ -6,13 +6,39 @@ "use strict";

});
Object.defineProperty(exports, "getChars", {
enumerable: true,
get: function get() {
return _utils.getChars;
}
});
Object.defineProperty(exports, "getStrikethroughChars", {
enumerable: true,
get: function get() {
return _utils.getStrikethroughChars;
}
});
Object.defineProperty(exports, "getStrikethroughString", {
enumerable: true,
get: function get() {
return _utils.getStrikethroughString;
}
});
Object.defineProperty(exports, "getString", {
enumerable: true,
get: function get() {
return _utils.getString;
}
});
Object.defineProperty(exports, "removeStrikethrough", {
enumerable: true,
get: function get() {
return _utils.removeStrikethrough;
}
});
Object.defineProperty(exports, "removeStrikethroughChars", {
enumerable: true,
get: function get() {
return _utils.removeStrikethroughChars;
}
});
var _utils = require("./utils");
Object.keys(_utils).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _utils[key];
}
});
});
var _utils = require("./utils");
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {

@@ -10,7 +8,16 @@ value: true

var regexp = _interopRequireWildcard(require("./regular-expressions"));
/* REGULAR EXPRESSIONS */
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
/**
* Strikethrough chars (short and long)
* @type {RegExp}
*/
var regexStrikethroughChars = /\w̵|\w̶|\W̵|\W̶|̵|̶/g;
/**
* Strikethrough symbols (short and long)
* @type {RegExp}
*/
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var regexStrikethrough = /[̵̶]/g;
/* UTILS */

@@ -22,5 +29,6 @@ /**

*/
var removeStrikethroughChars = function removeStrikethroughChars(str) {
if (str && typeof str === 'string') {
return str.replace(regexp.regexStrikethroughChars, '');
return str.replace(regexStrikethroughChars, '');
}

@@ -41,3 +49,3 @@

if (str && typeof str === 'string') {
return str.replace(regexp.regexStrikethrough, '');
return str.replace(regexStrikethrough, '');
}

@@ -58,3 +66,3 @@

if (str && typeof str === 'string') {
return str.match(regexp.regexStrikethroughChars) || [];
return str.match(regexStrikethroughChars) || [];
}

@@ -61,0 +69,0 @@

{
"name": "strikethrough-js",
"version": "2.0.2",
"description": "Manipulate strikethrough chars in Javascript",
"version": "2.0.3",
"description": "Manipulate strikethrough characters in Javascript",
"main": "lib/index.js",
"scripts": {
"build": "babel src --out-dir lib --ignore src/test",
"prepare": "npm run build",
"prepare": "rm -rf lib && npm run build",
"test": "jest"

@@ -10,0 +10,0 @@ },

Sorry, the diff of this file is not supported yet

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