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

docs-and-graphs

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docs-and-graphs - npm Package Compare versions

Comparing version 0.1.7 to 0.1.8

2

package.json
{
"name": "docs-and-graphs",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",

@@ -5,0 +5,0 @@ "description": "",

@@ -45,6 +45,12 @@ const PARENTHESIS_TYPES = [

// Accepts embedded pairs between brackets, [like:: this] (or like::this)
// Accepts embedded pairs between parentheses (like::this)
function extractInlineFields (str) {
const content = parseWithParenthesis(str)
return content.length ? content : parseWithoutParenthesis(str)
const extractFromLine = (line) => {
const content = parseWithParenthesis(line)
return content.length ? content : parseWithoutParenthesis(line)
}
return str.split('\n').map(extractFromLine).flat()
}

@@ -51,0 +57,0 @@

@@ -24,3 +24,6 @@ import { expect } from 'expect'

'[[Alice]] :: foaf:knows :: [[Bob]]',
'http://example.org :: is a :: website']
'http://example.org :: is a :: website',
'a::b::c\na::f::d',
'Several lines\na::b\na::f'
]

@@ -32,8 +35,3 @@ expect.extend({ toMatchSnapshot })

it(current, async function () {
const fields = extractInlineFields(current)
console.log(current)
console.log(fields)
expect(fields).toMatchSnapshot(this)

@@ -47,5 +45,3 @@ })

it(current, async function () {
const text = removeInlineFields(current)
expect(text).toMatchSnapshot(this)

@@ -52,0 +48,0 @@ })

Sorry, the diff of this file is not supported yet

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