Skip to content

kentos/isobjectid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.1 - README and package meta data updates 1.0.0 - First release

About

Checks if string is an objectid (mongodb)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published