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

@humanwhocodes/momoa

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@humanwhocodes/momoa - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

2

package.json
{
"name": "@humanwhocodes/momoa",
"version": "3.0.1",
"version": "3.0.2",
"description": "JSON AST parser, tokenizer, printer, traverser.",

@@ -5,0 +5,0 @@ "author": "Nicholas C. Zakas",

@@ -122,6 +122,10 @@ # Momoa JSON

const { tokenize } = require("@humanwhocodes/momoa");
const json = "{\"foo\":\"bar\"}";
for (const token of tokenize(some_json_string)) {
console.log(token.type);
console.log(token.value);
for (const token of tokenize(json)) {
console.log("Token type is", token.type);
const start = token.loc.start.offset;
const end = token.loc.end.offset;
console.log("Token value is", json.slice(start, end));
}

@@ -128,0 +132,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