Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@endeo/specials
Advanced tools
Build "object spec" for compact object encoding.
A flexible specification allowing progressive improvements for greater performance.
Features:
See packages:
npm install --save @endeo/specials
// get the Specials builder
var build = require('@endeo/specials')
// the types we'd like to refer to by name.
// i'm using some default ones.
var types = require('@endeo/types')
// build it
var specials = build({ types: types })
// add more types:
specials.addType('someId', {
// optionally provide one or both
encode: function(enbyte, value, output) {},
decode: function(debyte, input) {}
})
// add a type which is always one of a set of values
specials.addType('fruit', {
// basically encodes the index of the value
select: [ 'apple', 'banana', 'orange' ]
})
// a "creator" function makes an object
// representing the object with all its keys
// and default values.
function createThing() {
return {
key1: 'someDefault',
key2: 2,
fruit: 'banana'
}
}
// the "enhancers" are extra info you can supply
var enhancers = {
key1: 'name of a type',
key2: {
// optionally ref a known type still
type: 'name of a type',
// optionally provide encode() / decode()
encode: function(enbyte, value, output) {},
decode: function(debyte, input) {}
},
fruit: 'fruit' // use type 'fruit' above
}
// create an "object spec" (Special)
var spec = specials.build(1, createThing, enhancers)
// set the spec's ID on your objects.
// on a class:
function SomeClass() {}
spec.imprint(SomeClass.prototype)
// on an object:
var someObject = {}
spec.imprint(someObject)
FAQs
Build "object spec" for compact object encoding.
The npm package @endeo/specials receives a total of 0 weekly downloads. As such, @endeo/specials popularity was classified as not popular.
We found that @endeo/specials 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.