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

collapse-whitespace

Package Overview
Dependencies
Maintainers
1
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.0.3 to 1.0.4

2

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

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

@@ -6,2 +6,3 @@ 'use strict';

ADDRESS: 1,
ARTICLE: 1,
ASIDE: 1,

@@ -8,0 +9,0 @@ BLOCKQUOTE: 1,

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

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.collapse=e()}}(function(){return function e(n,r,t){function o(f,u){if(!r[f]){if(!n[f]){var a="function"==typeof require&&require;if(!u&&a)return a(f,!0);if(i)return i(f,!0);var d=new Error("Cannot find module '"+f+"'");throw d.code="MODULE_NOT_FOUND",d}var l=r[f]={exports:{}};n[f][0].call(l.exports,function(e){var r=n[f][1][e];return o(r?r:e)},l,l.exports,e,n,r,t)}return r[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)o(t[f]);return o}({1:[function(e,n){"use strict";function r(e){return!(!o(e)||!f[e.nodeName])}function t(e){return e&&e.nodeType===Node.TEXT_NODE}function o(e){return e&&e.nodeType===Node.ELEMENT_NODE}function i(e){function n(n){for(;n&&n!==e;){if(n.nextSibling)return n.nextSibling;n=n.parentNode,d&&r(n)&&(d.data=d.data.replace(/[ \r\n\t]$/,""),d=null)}return null}function i(e){return e.firstChild?e.firstChild:n(e)}function f(e){var r=n(e);return e.parentNode.removeChild(e),r}var u,a,d,l,c,p=/^ /,s=/ $/;if("PRE"!==e.nodeName){for(e.normalize(),l=i(e);l;)if(a=l.previousSibling,u=l.nextSibling,t(l))c=l.data.replace(/[ \r\n\t]+/g," "),(!d||a&&r(a))&&(c=c.replace(p,"")),u&&r(u)&&(c=c.replace(s,"")),d&&s.test(d.data)&&p.test(c)&&(c=c.substr(1)),c?(l.data=c,d=l,l=n(l)):l=f(l);else if(o(l)){if("PRE"===l.nodeName){l=n(l);continue}d&&r(l)&&(d.data=d.data.replace(s,""),d=null),l=i(l)}else l=f(l);d&&(d.data=d.data.replace(s,""))}}var f={ADDRESS:1,ASIDE:1,BLOCKQUOTE:1,DIV:1,FIGCAPTION:1,FIGURE:1,FOOTER:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1,HEADER:1,HR:1,LI:1,OL:1,P:1,PRE:1,SECTION:1,UL:1};n.exports=i},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.collapse=e()}}(function(){return function e(n,r,t){function o(f,u){if(!r[f]){if(!n[f]){var a="function"==typeof require&&require;if(!u&&a)return a(f,!0);if(i)return i(f,!0);var d=new Error("Cannot find module '"+f+"'");throw d.code="MODULE_NOT_FOUND",d}var l=r[f]={exports:{}};n[f][0].call(l.exports,function(e){var r=n[f][1][e];return o(r?r:e)},l,l.exports,e,n,r,t)}return r[f].exports}for(var i="function"==typeof require&&require,f=0;f<t.length;f++)o(t[f]);return o}({1:[function(e,n){"use strict";function r(e){return!(!o(e)||!f[e.nodeName])}function t(e){return e&&e.nodeType===Node.TEXT_NODE}function o(e){return e&&e.nodeType===Node.ELEMENT_NODE}function i(e){function n(n){for(;n&&n!==e;){if(n.nextSibling)return n.nextSibling;n=n.parentNode,d&&r(n)&&(d.data=d.data.replace(/[ \r\n\t]$/,""),d=null)}return null}function i(e){return e.firstChild?e.firstChild:n(e)}function f(e){var r=n(e);return e.parentNode.removeChild(e),r}var u,a,d,l,c,p=/^ /,s=/ $/;if("PRE"!==e.nodeName){for(e.normalize(),l=i(e);l;)if(a=l.previousSibling,u=l.nextSibling,t(l))c=l.data.replace(/[ \r\n\t]+/g," "),(!d||a&&r(a))&&(c=c.replace(p,"")),u&&r(u)&&(c=c.replace(s,"")),d&&s.test(d.data)&&p.test(c)&&(c=c.substr(1)),c?(l.data=c,d=l,l=n(l)):l=f(l);else if(o(l)){if("PRE"===l.nodeName){l=n(l);continue}d&&r(l)&&(d.data=d.data.replace(s,""),d=null),l=i(l)}else l=f(l);d&&(d.data=d.data.replace(s,""))}}var f={ADDRESS:1,ARTICLE:1,ASIDE:1,BLOCKQUOTE:1,DIV:1,FIGCAPTION:1,FIGURE:1,FOOTER:1,H1:1,H2:1,H3:1,H4:1,H5:1,H6:1,HEADER:1,HR:1,LI:1,OL:1,P:1,PRE:1,SECTION:1,UL:1};n.exports=i},{}]},{},[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