mongodb-ns
MongoDB namespace parsing and validation
Last updated 9 months ago by imlucas .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mongodb-ns 
SYNC missed versions from official npm registry.

mongodb-ns

build status

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

Current Tags

  • 2.2.0                                ...           latest (9 months ago)

11 Versions

  • 2.2.0                                ...           9 months ago
  • 2.1.0                                ...           9 months ago
  • 2.0.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago

Copyright 2014 - 2016 © taobao.org |