![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
commonform-flatten
Advanced tools
Produces a useful intermediary representation for rendering in linear document formats, like Office Open XML and terminal listings.
var flatten = require('commonform-flatten')
var assert = require('assert')
assert.deepStrictEqual(
flatten(
{
content: [
'some text ',
{ blank: '' },
{
heading: 'A',
form: {
conspicuous: 'yes',
content: [
'before',
{ form: { content: ['B'] } },
{ form: { content: ['C'] } },
'between',
{ form: { content: ['D'] } },
{ form: { content: ['E'] } },
'after'
]
}
},
'after',
{ use: 'A Defined Term' },
{
heading: 'Some Component',
component: 'https://example.com/component',
version: '1.0.0',
substitutions: {
terms: {},
headings: {}
}
}
]
},
[{ blank: ['content', 1], value: 'NewCo' }]
),
[
{
depth: 1,
content: [
'some text ',
{ blank: 'NewCo' }
]
},
{
depth: 2,
heading: 'A',
content: ['before'],
numbering: [
{
series: { number: 1, of: 2 },
element: { number: 1, of: 1 }
}
],
conspicuous: 'yes'
},
{
depth: 3,
content: ['B'],
numbering: [
{
series: { number: 1, of: 2 },
element: { number: 1, of: 1 }
},
{
series: { number: 1, of: 2 },
element: { number: 1, of: 2 }
}
]
},
{
depth: 3,
content: ['C'],
numbering: [
{
series: { number: 1, of: 2 },
element: { number: 1, of: 1 }
},
{
series: { number: 1, of: 2 },
element: { number: 2, of: 2 }
}
]
},
{
depth: 2,
content: ['between'],
conspicuous: 'yes'
},
{
depth: 3,
content: ['D'],
numbering: [
{
series: { number: 1, of: 2 },
element: { number: 1, of: 1 }
},
{
series: { number: 2, of: 2 },
element: { number: 1, of: 2 }
}
]
},
{
depth: 3,
content: ['E'],
numbering: [
{
series: { number: 1, of: 2 },
element: { number: 1, of: 1 }
},
{
series: { number: 2, of: 2 },
element: { number: 2, of: 2 }
}
]
},
{
depth: 2,
content: ['after'],
conspicuous: 'yes'
},
{
depth: 1,
content: [
'after',
{ use: 'A Defined Term' }
]
},
{
depth: 2,
heading: 'Some Component',
component: 'https://example.com/component',
version: '1.0.0',
substitutions: { terms: {}, headings: {} },
numbering: [
{
series: { number: 2, of: 2 },
element: { number: 1, of: 1 }
}
]
}
]
)
Preserves loaded component attributes:
var form = { content: ['This is a test.'] }
var reference = {
component: 'https://example.com/component',
version: '1.0.0',
substitutions: { terms: {}, headings: {} }
}
var component = {
publisher: 'Example Publisher',
name: 'Example Component',
version: '1.0.0'
}
assert.deepStrictEqual(
flatten(
{
content: [
{
heading: 'Example Component',
form: form,
component: component,
reference: reference
}
]
},
[/* no blanks */]
),
[
{
depth: 2,
heading: 'Example Component',
content: ['This is a test.'],
reference: reference,
component: component,
numbering: [
{
element: { number: 1, of: 1 },
series: { number: 1, of: 1 }
}
]
}
]
)
FAQs
flatten Common Forms
The npm package commonform-flatten receives a total of 0 weekly downloads. As such, commonform-flatten popularity was classified as not popular.
We found that commonform-flatten demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.