mongodb-ns 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +31 -0
- package/package.json +3 -1
package/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
class NS {
|
|
2
|
+
ns: string;
|
|
3
|
+
dotIndex: number;
|
|
4
|
+
database: string;
|
|
5
|
+
collection: string;
|
|
6
|
+
system: boolean;
|
|
7
|
+
isSystem: boolean;
|
|
8
|
+
oplog: boolean;
|
|
9
|
+
isOplog: boolean;
|
|
10
|
+
command: boolean;
|
|
11
|
+
isCommand: boolean;
|
|
12
|
+
special: boolean;
|
|
13
|
+
isSpecial: boolean;
|
|
14
|
+
specialish: boolean;
|
|
15
|
+
normal: boolean;
|
|
16
|
+
isNormal: boolean;
|
|
17
|
+
validDatabaseName: boolean;
|
|
18
|
+
validCollectionName: boolean;
|
|
19
|
+
databaseHash: number;
|
|
20
|
+
toString(): string;
|
|
21
|
+
static sort(namespaces: (string | NS)[]): typeof namespaces;
|
|
22
|
+
static MAX_DATABASE_NAME_LENGTH: number;
|
|
23
|
+
// Assigned in the constructor, but will always be undefined
|
|
24
|
+
// isConf: undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare const toNS: ((namespace: string | NS) => NS) & {
|
|
28
|
+
sort: typeof NS['sort'];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default toNS;
|
package/package.json
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mongodb-ns",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"author": "Lucas Hrabovsky <hrabovsky.lucas@gmail.com> (http://imlucas.com)",
|
|
5
5
|
"description": "MongoDB namespace parsing and validation",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"types": "./index.d.ts",
|
|
6
8
|
"scripts": {
|
|
7
9
|
"test": "mocha",
|
|
8
10
|
"check": "mongodb-js-precommit"
|