bson-objectid
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33053
1