Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
ipld-schema-describer
Advanced tools
Describe JavaScript object forms using IPLD Schemas.
import { describe } from 'ipld-schema-describer'
import schemaPrint from 'ipld-schema/print.js'
const obj = {
foo: [1, 'one', true],
bar: [1, 2, 3, 4],
baz: 'baz'
}
const { schema, root } = describe(obj)
console.log(schemaPrint(schema))
console.log('\nRoot:', root)
Prints:
type Struct_1 struct {
f0 Int
f1 String
f2 Bool
} representation tuple
type List_1 [Int]
type Struct_2 struct {
foo Struct_1
bar List_1
baz String
}
Root: Struct_2
Objects must conform to the IPLD Data Model, so undefined
is not supported and complex objects such as Date
, RegExp
and others should be avoided. Circular references are also not supported.
The resulting IPLD Schema is only able to describe the raw representation layout. IPLD Schemas are capable of describing complex shapes that cannot be inferred without additional information. Unions and Enums in particular are not able to be inferred. The Schema output from this library can be used as the basis of the formation of a more correct and concice Schema for any data layout. Read more in the IPLD Schemas documentation.
Copyright 2020 Rod Vagg
Licensed under Apache 2.0 (LICENSE-APACHE / http://www.apache.org/licenses/LICENSE-2.0)
FAQs
IPLD Schema Describer
We found that ipld-schema-describer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.