New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arlib

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arlib - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

lib/mongoid.js

2

fgets.js

@@ -1,1 +0,1 @@

module.exports = require('./lib/fgets');
module.exports = require('./lib/fgets.js');

@@ -5,6 +5,9 @@ /**

module.exports = {
tempnam: require('./tempnam'),
getopt: require('./getopt'),
Fgets: require('./fgets'),
FileReader: require('./lib/file-reader'),
tempnam: require('./tempnam.js'),
getopt: require('./getopt.js'),
nextopt: require('./getopt.js').nextopt,
mongoid: require('./mongoid.js').mongoid,
MongoId: require('./mongoid.js').MongoId,
Fgets: require('./fgets.js'),
FileReader: require('./lib/file-reader.js'),
};

@@ -26,3 +26,3 @@ /**

module.exports.getopt = getopt;
module.exports.netxtopt = nextopt;
module.exports.nextopt = nextopt;

@@ -29,0 +29,0 @@

{
"name": "arlib",
"version": "0.0.5",
"version": "0.0.6",
"description": "Andras' Utility Functions",

@@ -29,3 +29,7 @@ "license": "Apache-2.0",

"tempnam",
"fgets"
"fgets",
"mongoid",
"unique",
"mongo",
"quick"
],

@@ -32,0 +36,0 @@ "dependencies": {

@@ -25,11 +25,36 @@ # arlib

traditional unix command option extractor, returns an object with
the options set as properties.
traditional unix command option extractor, returns an object with the options
set as properties. Like traditional unix, getopt only checks for option
switches at the beginning of the argument list, preceding non-switch
arguments. It recognizes '-' as a filename and '--' as the special marker
that stops further argument scanning.
var getopt = require('arlib/getopt').getopt;
var options = getopt(process.argv, "f:h");
// {f: 'filename', h: true}
// { f: 'filename', h: true }
var options = getopt(process.argv, "(-file):(-help)");
// {file: 'filename', help: true}
### mongoid
very fast, light-weight mongodb compatible timestamped unique id
generator. Can be used as a convenience function to return unique-ish
(random) ids, or as an id factory configured with a unique system id
to return locale-specific guaranteed unique ids.
// convenience function, picks a random system id
var mongoid = require('arlib').mongoid;
id = mongoid();
id = mongoid();
// 543f376340e2816497000001
// 543f376340e2816497000002
// id factory, configured for the unique system identifier 1
var MongoId = require('arlib').MongoId;
var idFactory = new MongoId(1);
id = idFactory.fetch();
id = idFactory.fetch();
// 543f3789000001649f000001
// 543f3789000001649f000002
### Fgets

@@ -42,3 +67,3 @@

var Fgets = require('arlib').Fgets;
var fp = new Fgets(fs.createReadStream(filename, 'r'));
var fp = new Fgets(fs.createReadStream('/etc/motd', 'r'));
// line = fp.fgets();

@@ -48,6 +73,6 @@

fast file reader to fee data to fgets, 30% faster than read streams.
fast file reader to feed data to fgets, 30% faster than read streams.
var FileReader = require('arlib').FileReader;
var fp = new Fgets(new FileReader(filename));
var fp = new Fgets(new FileReader('/etc/motd'));
// line = fp.fgets();

@@ -1,1 +0,1 @@

module.exports = require('./lib/tempnam');
module.exports = require('./lib/tempnam.js');
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