Use MongoDB ObjectID without installing bson.
npm install @tybys/oid bash
$ npm install @tybys/oid
`
$3
`
$ oid -h
Usage: oid [options]
Options:
-v, -V, --version output the version number
-h, --help output usage information
-n, --number output N number of ObjectIds
Repo: https://github.com/toyobayashi/oid
`
$3
IE OK!
` html
`
$3
` js
const { ObjectId } = require('@tybys/oid')
console.log(new ObjectId())
`
$3
` ts
import { ObjectId } from '@tybys/oid'
console.log(new ObjectId())
``