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

line-clamp

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

line-clamp - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

6

index.js

@@ -11,3 +11,3 @@ function truncateTextNode (

lastIndexOfWhitespace = textContent.lastIndexOf(' ')
if (lastIndexOfWhitespace == -1) {
if (lastIndexOfWhitespace === -1) {
break

@@ -65,3 +65,3 @@ }

if (
(nodeType == 1 &&
(nodeType === 1 &&
truncateElementNode(

@@ -73,3 +73,3 @@ childNode,

)) ||
(nodeType == 3 &&
(nodeType === 3 &&
truncateTextNode(

@@ -76,0 +76,0 @@ childNode,

{
"name": "line-clamp",
"version": "0.0.7",
"version": "0.0.8",
"description": "Line clamp a DOM element in vanilla JavaScript.",

@@ -17,8 +17,10 @@ "author": "Lim Yuan Qing",

"prettier-standard": "^8.0.0",
"uglify-js": "^3.3.11",
"watchify": "^3.10.0"
"standard": "^11.0.0",
"uglify-js": "^3.3.12",
"watchify": "^3.11.0"
},
"scripts": {
"start": "concurrently \"watchify index.js --standalone lineClamp --outfile example/bundle.js\" \"ecstatic example --port 8080\" \"opn 'http://0.0.0.0:8080/'\"",
"lint": "prettier-standard index.js --no-semi --single-quote --write",
"fix": "prettier-standard index.js",
"lint": "standard index.js",
"weight": "uglifyjs index.js --compress --mangle --toplevel | gzip-size"

@@ -25,0 +27,0 @@ },

@@ -8,3 +8,3 @@ # line-clamp [![npm Version](http://img.shields.io/npm/v/line-clamp.svg?style=flat)](https://www.npmjs.com/package/line-clamp) [![Build Status](https://img.shields.io/travis/yuanqing/line-clamp.svg?branch=master&style=flat)](https://travis-ci.org/yuanqing/line-clamp)

- Supports appending a custom string instead of an ellipsis (`…`)
- 476 bytes gzipped
- 477 bytes gzipped

@@ -61,3 +61,3 @@ ## Usage

- Set `options.ellipsis` to change the string to be appended to the truncated text (defaults to `…`).
- Set `options.ellipsis` to change the string to be appended to the truncated text. Defaults to `…`.

@@ -64,0 +64,0 @@ See [Usage](#usage).

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