@tybys/oid

Use MongoDB ObjectID without installing bson.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@tybys/oid
004.0.02 years ago4 years agoMinified + gzip package size for @tybys/oid in KB

Readme

oid-js
Use MongoDB ObjectID without installing bson.

Usage

``` bash $ npm install @tybys/oid ```

CLI

``` $ 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 ```

Browser

IE OK! ``` html ```

Node.js

``` js const { ObjectId } = require('@tybys/oid') console.log(new ObjectId()) ```

TypeScript

``` ts import { ObjectId } from '@tybys/oid' console.log(new ObjectId()) ```

API

Same as mongodb/js-bson/src/objectid.ts. API Documentation