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

d3plus-text

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3plus-text - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

6

es/src/strip.js

@@ -9,6 +9,8 @@ // great unicode list: http://asecuritysite.com/coding/asc2

@param {String} value
@param {String} [spacer = "-"] The character(s) to be used in place of spaces.
*/
export default function (value) {
return "".concat(value).replace(/[^A-Za-z0-9\-_]/g, function (_char) {
if (_char === " ") return "-";
var spacer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "-";
return "".concat(value).replace(/[^A-Za-z0-9\-_\u0621-\u064A]/g, function (_char) {
if (_char === " ") return spacer;
var ret = false;

@@ -15,0 +17,0 @@ for (var d = 0; d < diacritics.length; d++) {

{
"name": "d3plus-text",
"version": "1.2.3",
"version": "1.2.4",
"description": "A smart SVG text box with line wrapping and automatic font size scaling.",

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

@@ -463,3 +463,3 @@ # d3plus-text

<a name="strip"></a>
#### d3plus.**strip**(value) [<>](https://github.com/d3plus/d3plus-text/blob/master/src/strip.js#L18)
#### d3plus.**strip**(value, [spacer]) [<>](https://github.com/d3plus/d3plus-text/blob/master/src/strip.js#L18)

@@ -471,2 +471,8 @@ Removes all non ASCII characters from a string.

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| value | <code>String</code> | | |
| [spacer] | <code>String</code> | <code>&quot;-&quot;</code> | The character(s) to be used in place of spaces. |
---

@@ -646,2 +652,2 @@

###### <sub>Documentation generated on Tue, 07 Mar 2023 17:29:23 GMT</sub>
###### <sub>Documentation generated on Tue, 07 Nov 2023 14:33:30 GMT</sub>

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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