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

@toml-tools/lexer

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@toml-tools/lexer - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

CHANGELOG.md

2

lib/tokens.js

@@ -103,3 +103,3 @@ /* eslint-disable no-unused-vars */

name: "LiteralMultiLineString",
pattern: makePattern`'''(?:${f.ML_LITERAL_CHAR}|${Newline})*'''`,
pattern: makePattern`('''|""")(?:${f.ML_LITERAL_CHAR}|${Newline})*\\1`,
categories: [IString]

@@ -106,0 +106,0 @@ });

{
"name": "@toml-tools/lexer",
"version": "0.3.1",
"version": "0.3.2",
"description": "TOML Lexer Implemented in JavaScript",

@@ -21,4 +21,3 @@ "keywords": [

"access": "public"
},
"gitHead": "5b378848b9efa8636e672a455d379065a6af69b2"
}
}

@@ -8,6 +8,16 @@ const { tokenize } = require("../");

title = "TOML Example"
description1 = '''
Some
multiline
description
'''
description2 = """
Some
multiline
description
"""
`;
const lexingResult = tokenize(input);
expect(lexingResult.errors).to.be.empty;
expect(lexingResult.tokens).to.have.lengthOf(6);
expect(lexingResult.tokens).to.have.lengthOf(14);
const tokenImages = lexingResult.tokens.map(tok => tok.image);

@@ -20,2 +30,10 @@ expect(tokenImages).to.deep.equal([

'"TOML Example"',
"\n",
"description1",
"=",
"'''\nSome\nmultiline\ndescription\n'''",
"\n",
"description2",
"=",
'"""\nSome\nmultiline\ndescription\n"""',
"\n"

@@ -22,0 +40,0 @@ ]);

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