Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@oada/oadaify
Advanced tools
A library to make working with OADA data in JavaSript/TypeScript less annoying.
I was always writing loops with checks to skip _
keys,
or forgetting to add the check and my code did something weird.
This makes loops etc. do what one expecst and wants 99% of the time.
The library exports Symbol
s which can be used to access the OADA keys.
The OADAified objects still function correctly with JSON.stringify
and ajv
.
There is a deoadaify function in the case you need to put it back.
Be warned though, TypeScript is... quirky about Symbol
keys in objects.
You should mostly be fine, but sometimes it will get dumb on you.
import {
oadaify,
// Symbol for accessing `_id`
_id,
} from '@oada/oadaify';
// Some data from an OADA API
const data = {
_id: 'resources/123',
_rev: 1,
_type: 'application/foo+json',
foo: 'bar',
baz: 7,
};
// OADAify the data
const oadaified = oadaify(data);
// Makes loops etc only get non OADA keys
console.log(Object.entries(oadaified)); // [['foo', 'bar'], ['baz', 7]]
// The OADA keys are not gone
console.log(oadaified[_id]); // 'resources/123'
// JSON is still original OADA data
console.log(JSON.stringify(oadaified, null, 2));
/*
{
"_id": "resources/123",
"_rev": 1,
"_type": "application/foo+json",
"foo": "bar",
"baz": 7,
}
*/
FAQs
Make OADA data nicer to work with in JS/TS
The npm package @oada/oadaify receives a total of 31 weekly downloads. As such, @oada/oadaify popularity was classified as not popular.
We found that @oada/oadaify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.