Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
$ npm install urine -g
This library provides a simple CLI and a JavaScript API for sampling data from a stream or file for testing or limiting data consumption. It can be installed in whichever way you prefer, but I recommend NPM.
Typical usage is from the command line with the urine
command. To get help or
usage information, try urine -h
.
# Sample the input.txt file, splitting around newlines with a probability of 0.1
$ urine -p 0.1 input.txt
# Sample the input.txt file, splitting around commas with a probability of 0.9
$ urine -p .9 -s ',' input.txt
# Sample the input.txt file, splitting around colons or semicolons with a probability of 0.75
$ urine -p .75 -s '[:;]' input.txt
# Sample the input.txt file through stdin with a probability of 0.001
$ cat input.txt | urine -p 0.001
# Sample the syslog file through stdin with a probability of 0.1
# Note that `tail` keeps the stream open, as will `urine`
$ tail -f /var/log/syslog | urine -p .1
There's also a public JavaScript API for working with streams inside your application.
var urine = require('urine');
var fs = require('fs');
var stdout = process.stdout;
var stream = fs.createReadStream('input.txt');
urine(stream, stdout, {
probability: 0.1
});
I accept contributions to the source via Pull Request, but passing unit tests must be included before it will be considered for merge.
$ curl -O https://raw.githubusercontent.com/adlawson/vagrantfiles/master/nodejs/Vagrantfile
$ vagrant up
$ vagrant ssh
$ cd /srv
$ npm test
The content of this library is released under the MIT License by
Andrew Lawson.
You can find a copy of this license in
LICENSE
or at http://www.opensource.org/licenses/mit.
FAQs
Sample a data stream
The npm package urine receives a total of 8 weekly downloads. As such, urine popularity was classified as not popular.
We found that urine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.