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

ast-contains-only-empty-space

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-contains-only-empty-space - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "ast-contains-only-empty-space",
"version": "1.0.1",
"version": "1.0.2",
"description": "Returns Boolean depending if passed AST contain only empty space",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -109,7 +109,7 @@ # ast-contains-only-empty-space

Working with parsed HTML is always a battle against white space. Often you need to know, does certain AST piece (object/array/whatever) contain anything real, or just an empty space. That's what this library is for.
Working with parsed HTML is always a battle against the white space. Often you need to know, does certain AST piece (object/array/whatever) contain anything real, or just an empty space. That's what this library is for.
In real life, parsed HTML trees will have many levels of nested arrays, objects and strings. While it's easy to check does a plain object contain only empty space (`\n`, ` `, `\t`, line break or a mix of thereof), it's not so easy when your object has arrays of empty objects. I want a solid, tested library which can identify emptiness (or lack of) in anything, nested or not nested.
In real life, parsed HTML trees will have many levels of nested arrays, objects and strings. While it's easy to check does a plain object contain only empty space (`'\n'`, `' '`, `'\t'`, line break or a mix of thereof), it's not so easy when your object has arrays of empty objects. I want a solid, tested library which can identify emptiness (or lack of) in anything, nested or not nested.
By the way, weird things (like functions, which don't belong to parsed HTML structures) will yield cause result `false`.
By the way, weird things (like functions, which don't belong to parsed HTML structures) will yield a result `false`.

@@ -116,0 +116,0 @@ **[⬆  back to top](#)**

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