# mongodb-ns

[![build status](https://secure.travis-ci.org/mongodb-js/ns.png)](http://travis-ci.org/mongodb-js/ns)

Handle dem namespaces like the kernel do.

```
var ns = require('mongodb-ns');

var bacon = ns('canadian-things.songs-aboot-bacon');
console.log(bacon.toString(), bacon);
```

will output

```
canadian-things.songs-aboot-bacon NS {
  ns: 'canadian-things.songs-aboot-bacon',
  dotIndex: 15,
  database: 'canadian-things',
  collection: 'songs-aboot-bacon',
  system: false,
  oplog: false,
  command: false,
  special: false,
  specialish: false,
  normal: true,
  validDatabaseName: true,
  validCollectionName: true,
  databaseHash: 23620443216 }
```


## license

MIT

# mongodb-ns

[![build status](https://secure.travis-ci.org/mongodb-js/ns.png)](http://travis-ci.org/mongodb-js/ns)

Handle dem namespaces like the kernel do.

```
var ns = require('mongodb-ns');

var bacon = ns('canadian-things.songs-aboot-bacon');
console.log(bacon.toString() + '\n', bacon);
```

will output

```
canadian-things.songs-aboot-bacon
 NS {
  ns: 'canadian-things.songs-aboot-bacon',
  dotIndex: 15,
  database: 'canadian-things',
  collection: 'songs-aboot-bacon',
  system: false,
  oplog: false,
  command: false,
  special: false,
  specialish: false,
  normal: true,
  validDatabaseName: true,
  validCollectionName: true,
  databaseHash: 23620443216 }
```


## license

MIT

Make where the "NS" comes from clearer, it's just copy/paste
Make where the "NS" comes from clearer, it's just copy/paste
