Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@architect/parser
Advanced tools
Architect Parser accepts plaintext, JSON, or YAML .arc manifests and returns a plain JavaScript Object
@architect/parser
.arc
is a simplistic text format for storing structured data;@architect/parser
is a function that accepts text and returns a plain JavaScriptObject
The format:
@section
@
Vector
or Map
String
, Number
or Boolean
Vector
values are space seperated scalar values on a single lineMap
is defined by a scalar value followed by Vectors indented two spaces#
symbolsnpm i @architect/parser
Consider a file some-arc-file.txt
with the following contents:
# this is a comment
@section-one
simple-string-value # String
another-value
4.2 # Number
true # Boolean
@another-section-of-vectors
vector of values
vector tuple
@this-section-has-a-map
hello-world
name some-value
Running the following inside nodejs:
var parser = require('@architect/parser')
var fs = require('fs')
var text = fs.readFileSync('./some-arc-file.txt').toString()
var result = parse(text)
Would yield the following:
{
"section-one": [
"simple-string-value",
"another-value",
4.2,
true
],
"another-section-of-vectors": [
["vector", "of", "values"],
["vector", "tuple"]
],
"this-section-has-a-map": [{
"hello-world": {
"name": "some-value"
}
}]
}
parse(text)
Takes as input raw .arc
file text and outputs an @architect parsed Object
.
parse.json(jsonText)
Takes as input raw JSON text representing an @architect parsed Object
and
trims it down to only relevant @architect Object
properties.
parse.yaml(yamlText)
Takes as input raw YAML text representing an @architect parsed Object
,
converts it to JSON and trims it down to only relevant @architect Object
properties.
FAQs
Architect Parser accepts plaintext, JSON, or YAML .arc manifests and returns a plain JavaScript Object
The npm package @architect/parser receives a total of 3,941 weekly downloads. As such, @architect/parser popularity was classified as popular.
We found that @architect/parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.