![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@tybys/oid
Advanced tools
Use MongoDB ObjectID without installing bson.
dist/oid.js
: 17KBdist/oid.min.js
: 7KB$ npm install @tybys/oid
$ oid -h
Usage: oid [options]
Options:
-v, -V, --version output the version number
-h, --help output usage information
-n, --number <N> output N number of ObjectIds
Repo: https://github.com/toyobayashi/oid
IE OK!
<script src="node_modules/@tybys/oid/index.js"></script>
<!-- or -->
<!-- <script src="node_modules/@tybys/oid/dist/oid.min.js"></script> -->
<!-- or end -->
<script>
console.log(new oid.ObjectId());
</script>
const { ObjectId } = require('@tybys/oid')
console.log(new ObjectId())
import { ObjectId } from '@tybys/oid'
console.log(new ObjectId())
Same as mongodb/js-bson/lib/objectid.js.
See index.d.ts
.
export declare interface EmptyDocument {
$oid: string;
}
export declare interface Document extends EmptyDocument {
[field: string]: any;
}
export declare class ObjectId {
constructor(id?: number | string | number[] | Uint8Array | ObjectId);
static createFromTime(time: number): ObjectId;
static createFromHexString(hexString: string): ObjectId;
static isValid(otherId: number | string | number[] | Uint8Array | ObjectId): boolean;
static createPk(): ObjectId;
static generate(time?: number): number[] | Uint8Array;
static getInc(): number;
static fromExtendedJSON(doc: Document): ObjectId;
static index: number;
readonly id: string | number[] | Uint8Array;
readonly _bsontype: 'ObjectID';
generationTime: number;
toHexString(): string;
equals(otherId: string | number[] | Uint8Array | ObjectId): boolean;
getTimestamp(): Date;
toString(format?: string): string;
toJSON(): string;
toExtendedJSON(): EmptyDocument;
}
FAQs
Use MongoDB ObjectID without installing bson.
The npm package @tybys/oid receives a total of 148 weekly downloads. As such, @tybys/oid popularity was classified as not popular.
We found that @tybys/oid 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.