@architect/parser
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -11,4 +11,8 @@ module.exports = function getSections(text) { | ||
// splits text into array of arrays | ||
var sections = text.split('@').filter(Boolean).map(c=> c.split(/\r?\n/).filter(Boolean).map(s=>s.trimRight())) | ||
let newline = /\r\n?|\n/ | ||
let trims = v=> v.trimRight() | ||
let empty = v => typeof v === 'string'? v.length > 0 : true | ||
let contents = c=> c.split(newline).filter(Boolean).map(trims).filter(empty) | ||
let sections = text.split('@').filter(Boolean).map(contents) | ||
// validates sections | ||
@@ -15,0 +19,0 @@ sections.forEach(section=> { |
@@ -0,0 +0,0 @@ module.exports = function visit(section) { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ # Contributing |
@@ -0,0 +0,0 @@ var removeComments = require('./_remove-comments') |
{ | ||
"name": "@architect/parser", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "function that accepts .arc text and returns a plain JavaScript Object", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -0,0 +0,0 @@ # <kbd>:cloud_with_lightning: @architect/parser</kbd> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19112
141