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

collapse-whitespace

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collapse-whitespace - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

2

package.json
{
"name": "collapse-whitespace",
"version": "1.1.4",
"version": "1.1.5",
"description": "Remove unnecessary whitespace from an element.",

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

@@ -1,1 +0,1 @@

(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.collapse=e()}})(function(){var e,t,r;return function e(t,r,n){function o(u,a){if(!r[u]){if(!t[u]){var f=typeof require=="function"&&require;if(!a&&f)return f(u,!0);if(i)return i(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var d=r[u]={exports:{}};t[u][0].call(d.exports,function(e){var r=t[u][1][e];return o(r?r:e)},d,d.exports,e,t,r,n)}return r[u].exports}var i=typeof require=="function"&&require;for(var u=0;u<n.length;u++)o(n[u]);return o}({1:[function(e,t,r){"use strict";var n=e("void-elements");Object.keys(n).forEach(function(e){n[e.toUpperCase()]=1});var o={};e("block-elements").forEach(function(e){o[e.toUpperCase()]=1});function i(e){return!!(e&&o[e.nodeName])}function u(e){return!!(e&&n[e.nodeName])}function a(e,t){if(!e.firstChild||e.nodeName==="PRE")return;if(typeof t!=="function"){t=i}var r=null;var n=false;var o=null;var a=l(o,e);while(a!==e){if(a.nodeType===3){var d=a.data.replace(/[ \r\n\t]+/g," ");if((!r||/ $/.test(r.data))&&!n&&d[0]===" "){d=d.substr(1)}if(!d){a=f(a);continue}a.data=d;r=a}else if(a.nodeType===1){if(t(a)||a.nodeName==="BR"){if(r){r.data=r.data.replace(/ $/,"")}r=null;n=false}else if(u(a)){r=null;n=true}}else{a=f(a);continue}var s=l(o,a);o=a;a=s}if(r){r.data=r.data.replace(/ $/,"");if(!r.data){f(r)}}}function f(e){var t=e.nextSibling||e.parentNode;e.parentNode.removeChild(e);return t}function l(e,t){if(e&&e.parentNode===t||t.nodeName==="PRE"){return t.nextSibling||t.parentNode}return t.firstChild||t.nextSibling||t.parentNode}t.exports=a},{"block-elements":2,"void-elements":3}],2:[function(e,t,r){t.exports=["address","article","aside","audio","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","noscript","ol","output","p","pre","section","table","tfoot","ul","video"]},{}],3:[function(e,t,r){t.exports={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,menuitem:true,meta:true,param:true,source:true,track:true,wbr:true}},{}]},{},[1])(1)});
(function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.collapse=e()}})(function(){var e,t,r;return function n(e,t,r){function o(u,a){if(!t[u]){if(!e[u]){var f=typeof require=="function"&&require;if(!a&&f)return f(u,!0);if(i)return i(u,!0);var l=new Error("Cannot find module '"+u+"'");throw l.code="MODULE_NOT_FOUND",l}var d=t[u]={exports:{}};e[u][0].call(d.exports,function(t){var r=e[u][1][t];return o(r?r:t)},d,d.exports,n,e,t,r)}return t[u].exports}var i=typeof require=="function"&&require;for(var u=0;u<r.length;u++)o(r[u]);return o}({1:[function(e,t,r){"use strict";var n=e("void-elements");Object.keys(n).forEach(function(e){n[e.toUpperCase()]=1});var o={};e("block-elements").forEach(function(e){o[e.toUpperCase()]=1});function i(e){return!!(e&&o[e.nodeName])}function u(e){return!!(e&&n[e.nodeName])}function a(e,t){if(!e.firstChild||e.nodeName==="PRE")return;if(typeof t!=="function"){t=i}var r=null;var n=false;var o=null;var a=l(o,e);while(a!==e){if(a.nodeType===3){var d=a.data.replace(/[ \r\n\t]+/g," ");if((!r||/ $/.test(r.data))&&!n&&d[0]===" "){d=d.substr(1)}if(!d){a=f(a);continue}a.data=d;r=a}else if(a.nodeType===1){if(t(a)||a.nodeName==="BR"){if(r){r.data=r.data.replace(/ $/,"")}r=null;n=false}else if(u(a)){r=null;n=true}}else{a=f(a);continue}var s=l(o,a);o=a;a=s}if(r){r.data=r.data.replace(/ $/,"");if(!r.data){f(r)}}}function f(e){var t=e.nextSibling||e.parentNode;e.parentNode.removeChild(e);return t}function l(e,t){if(e&&e.parentNode===t||t.nodeName==="PRE"){return t.nextSibling||t.parentNode}return t.firstChild||t.nextSibling||t.parentNode}t.exports=a},{"block-elements":2,"void-elements":3}],2:[function(e,t,r){t.exports=["address","article","aside","audio","blockquote","canvas","dd","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","noscript","ol","output","p","pre","section","table","tfoot","ul","video"]},{}],3:[function(e,t,r){t.exports={area:true,base:true,br:true,col:true,embed:true,hr:true,img:true,input:true,keygen:true,link:true,menuitem:true,meta:true,param:true,source:true,track:true,wbr:true}},{}]},{},[1])(1)});
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