Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
numgen
Advanced tools
Changelog
0.1.1 / 2015-05-29
Readme
Creates objects that generate number sequences.
Objects are iterable according to ECMAScript 6 (for example, they can be used in for-of
loop).
Disclaimer: this package does not have anything common with ECMAScript 6 generators nor with yield
operator.
npm install numgen
component install gamtiq/numgen
jam install numgen
bower install numgen
jspm install numgen
spm install numgen
Use dist/numgen.js
or dist/numgen.min.js
(minified version).
var NumGen = require("numgen");
var NumGen = require("gamtiq/numgen");
...
require(["numgen"], function(NumGen) {
...
});
System.import("numgen").then(function(NumGen) {
...
});
define(["path/to/dist/numgen.js"], function(NumGen) {
...
});
<!-- Use bower_components/numgen/dist/numgen.js if the library was installed by Bower -->
<script type="text/javascript" src="path/to/dist/numgen.js"></script>
<script type="text/javascript">
// numgen is available via NumGen field of window object
...
</script>
var seq = new NumGen({
startValue: 3,
factor: 4,
valueChange: function(data) {
return data.index > 1 ? data.current : data.value;
}
});
console.log("Geometric progression:");
for (var nI = 1; nI < 11; nI++) {
console.log("#", nI, " - ", seq.getNext());
}
console.log("Next: ");
for (var num of seq) {
nI = seq.getIndex();
console.log("#", nI, " - ", num);
if (nI > 19) {
break;
}
}
See test/numgen.js
for additional examples.
See doc
folder.
MIT
FAQs
Creates objects that generate number sequences
The npm package numgen receives a total of 1 weekly downloads. As such, numgen popularity was classified as not popular.
We found that numgen 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.