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

@architect/parser

Package Overview
Dependencies
Maintainers
7
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@architect/parser - npm Package Compare versions

Comparing version 1.0.6 to 1.1.0

14

_remove-comments.js
/**
* removes # comments and trims leading/trailing whitespace
* removes:
* - comments
* - empty lines
* - trailing spaces
*/
var comments = /\#.*/gm
var emptyLines = /(^[ \t]*\n)/gm
var trailingSpaces = / (\n|\r)/g
module.exports = function removeComments(text) {
return text.trim().replace(/\#.*/g, '').replace(/ \n/g, '').trim()
var noComments = text.trim().replace(comments, '').trim()
var noEmptyLines = noComments.replace(emptyLines, '')
var noTrailingSpaces = noEmptyLines.replace(trailingSpaces, '\n')
return noTrailingSpaces
}

2

package.json
{
"name": "@architect/parser",
"version": "1.0.6",
"version": "1.1.0",
"description": "function that accepts .arc text and returns a plain JavaScript Object",

@@ -5,0 +5,0 @@ "main": "index.js",

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