@kentos/isobjectid

1.0.1 • Public • Published

isobjectid

Small helper library to check if a string is an ObjectID. Comes in handy when the frontend just want to do a simple check of and ID to see if it's an ObjectID or not.

Usage

const isobjectid = require('@kentos/isobjectid')
if (isobjectid(string)) {
  // go on from here
} else {
  // throw an error or whatever you want
}

Changelog

1.0.0 - First release

Readme

Keywords

none

Package Sidebar

Install

npm i @kentos/isobjectid

Weekly Downloads

120

Version

1.0.1

License

ISC

Unpacked Size

883 B

Total Files

3

Last publish

Collaborators

  • kentos