Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bson-objectid

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bson-objectid - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

2

objectid.js

@@ -98,3 +98,3 @@

ObjectID.isValid = function(objectid) {
if(!objectid || (typeof objectid !== 'string' && (typeof objectid !== 'object' || typeof objectid.toString !== 'function'))) return false;
if(!objectid || (typeof objectid !== 'string' && (typeof objectid !== 'object' || Array.isArray(objectid) || typeof objectid.toString !== 'function'))) return false;

@@ -101,0 +101,0 @@ //call .toString() to get the hex if we're

{
"name": "bson-objectid",
"version": "1.3.0",
"version": "1.3.1",
"description": "Construct ObjectIDs without the mongodb driver or bson module",
"main": "objectid.js",
"typings": "./objectid.d.ts",
"types": "./objectid.d.ts",
"directories": {

@@ -8,0 +8,0 @@ "test": "test"

@@ -35,12 +35,12 @@ BSON ObjectID  [![Build Status](https://travis-ci.org/williamkapke/bson-objectid.svg?branch=master)](https://travis-ci.org/williamkapke/bson-objectid)

#### #id
#### id
**returns** the 12 byte id string.
#### #str
#### #toHexString()
#### str
#### toHexString()
**returns** the `ObjectID` represented as a 24 character hex string.
#### #equals(other)
#### equals(other)
**returns** true if the `ObjectID`s represent the same underlying value. Otherwise false.
#### #getTimestamp()
#### getTimestamp()
**returns** the generation `Date` (accurate up to the second) that this `ObjectID` was generated.

@@ -47,0 +47,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc