Socket
Book a DemoInstallSign in
Socket

is-object-id

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-object-id

Test if a string is a valid mongo object id

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
5
Maintainers
1
Weekly downloads
 
Created
Source

is-object-id

Check if a string is formatted as a valid mongo object id

#Example

  var isObjectID = require('is-object-id');
  isObjectID('1123456789abcdef11111111'); // true
  isObjectID('1'); // false
  isObjectID(['this is an array']); // false

That's it really.

Keywords

mongo

FAQs

Package last updated on 29 Jun 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.