
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
common object helper functions written in TypeScript which can be used in NodeJS and the browser (supports ES6).
$ npm install o
$ yarn add o
import o from 'o';
// or require specific functions
import { is, empty } from 'o';
const o = require('o');
// or require specific functions
const { is, empty } = require('o');
<!-- Script tag -->
<script
type="module"
src="./o.min.js"
/>
<!-- Import syntax -->
<script type="text/javascript">
import './o.min.js';
</script>
<script
type="application/javascript"
src="https://cdn.jsdelivr.net/npm/o@2.0.0/dist/o.min.js"
/>
const a = {
a: 1,
b: 2,
c: {
d: 3,
e: 4,
},
};
is(a); // => true
empty(a); // => false
has(a, 'a'); // => true
has(a, 'd'); // => false
has(a, 'c.d'); // => true
const b = set(a, 'f', 5);
get(b, 'f'); // => 5
For more examples and a list of all functions view the documentation page.
You can view the documentation here, docs are generated by TypeDoc.
All functions are documented with TypeDoc and are fully commented explaining how they works. If you want to
contribute feel free to open a PR. When you open a PR please make sure yarn test
and yarn lint
both pass
with no errors and if any tests fail or any linting issues are raised please fix them accordingly.
FAQs
common object helper functions
The npm package o receives a total of 6,498 weekly downloads. As such, o popularity was classified as popular.
We found that o 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.