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

hyphen

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyphen - npm Package Compare versions

Comparing version 1.10.2 to 1.10.3

9

hyphen.js

@@ -42,3 +42,3 @@ /** Text hyphenation in Javascript.

);
function createHTMLVerifier(skipHTML) {
function createHTMLVerifier() {
var skip = false;

@@ -53,4 +53,3 @@ return function (accumulate, chars) {

chars[0] === "<" &&
(!isNotLetter(chars[1]) || chars[1] === "/") &&
skipHTML
(!isNotLetter(chars[1]) || chars[1] === "/")
) {

@@ -229,3 +228,5 @@ skip = true;

createHyphenationVerifier(
[createHTMLVerifier(skipHTML), createHyphenCharVerifier(hyphenChar)],
(skipHTML ? [createHTMLVerifier()] : []).concat(
createHyphenCharVerifier(hyphenChar)
),
minWordLength

@@ -232,0 +233,0 @@ )

{
"name": "hyphen",
"version": "1.10.2",
"version": "1.10.3",
"description": "Text hyphenation in Javascript.",

@@ -5,0 +5,0 @@ "repository": {

@@ -695,4 +695,4 @@ ![Franklin M. Liang's hyphenation algorithm](https://ytiurin.github.io/hyphen/01.png)

```html
<script src="https://cdn.jsdelivr.net/npm/hyphen@1.10.2/patterns/en-us.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hyphen@1.10.2/hyphen.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hyphen@1.10.3/patterns/en-us.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hyphen@1.10.3/hyphen.min.js"></script>
```

@@ -738,14 +738,4 @@

Default exported `hyphenateHTML` function
In cases when text parser should not skip HTML tags, apply the following code changes.
```javascript
// Code before 1.10.0
hyphenateHTML(text);
```
```javascript
// Code after 1.10.0
hyphenate(text);
```
Default exported `hyphenate` function

@@ -752,0 +742,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