All Projects → gamtiq → Numgen

gamtiq / Numgen

Licence: mit
Creates objects that generate number sequences

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Numgen

Github Activity Generator
A script that helps generate a rich GitHub Contribution Graph for your account
Stars: ✭ 259 (+5080%)
Mutual labels:  generate, generator
Project Name
Get the name of a project from package.json, git config, or basename of the current working directory.
Stars: ✭ 8 (+60%)
Mutual labels:  generate, generator
Laravel Bootstrap Table List
Bootstrap table list generator for Laravel.
Stars: ✭ 16 (+220%)
Mutual labels:  generate, generator
Prompt Checkbox
This repository has been archived, use Enquirer instead.
Stars: ✭ 21 (+320%)
Mutual labels:  generate, generator
Generate
A new command line tool and developer framework for scaffolding out GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.
Stars: ✭ 238 (+4660%)
Mutual labels:  generate, generator
Laravel Table
Generate tables from Eloquent models.
Stars: ✭ 101 (+1920%)
Mutual labels:  generate, generator
Generate Gh Repo
Generate generator to create a new repository on GitHub.
Stars: ✭ 11 (+120%)
Mutual labels:  generate, generator
mosaic-node-generator
Generate mosaic images in Node.
Stars: ✭ 25 (+400%)
Mutual labels:  generator, generate
Iconizer
Create Xcode asset catalogs swift and painless. Generate images for macOS and iOS app icons, launch images and image sets.
Stars: ✭ 751 (+14920%)
Mutual labels:  generate, generator
Arkit
JavaScript architecture diagrams and dependency graphs
Stars: ✭ 671 (+13320%)
Mutual labels:  generate
Sudoku
Can Neural Networks Crack Sudoku?
Stars: ✭ 742 (+14740%)
Mutual labels:  number
Structor
Structor - React UI Builder [DEPRECATED]
Stars: ✭ 5,522 (+110340%)
Mutual labels:  generator
Genie
GENie - Project generator tool
Stars: ✭ 693 (+13760%)
Mutual labels:  generator
Easybook
Book publishing as easy as it should be (built with Symfony components)
Stars: ✭ 744 (+14780%)
Mutual labels:  generator
Faker
Faker is a pure Elixir library for generating fake data.
Stars: ✭ 673 (+13360%)
Mutual labels:  generator
Github Changelog Generator
Automatically generate change log from your tags, issues, labels and pull requests on GitHub.
Stars: ✭ 6,631 (+132520%)
Mutual labels:  generator
Laravel Menu
Html menu generator for Laravel
Stars: ✭ 650 (+12900%)
Mutual labels:  generate
Pdfgenerator
A simple generator of PDF written in Swift.
Stars: ✭ 629 (+12480%)
Mutual labels:  generator
Cfonts
Sexy fonts for the console
Stars: ✭ 789 (+15680%)
Mutual labels:  generator
Recoil
Asynchronous coroutines for PHP 7.
Stars: ✭ 765 (+15200%)
Mutual labels:  generator

numgen

NPM version Build Status

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.

Installation

Node

npm install numgen

Component

component install gamtiq/numgen

Jam

jam install numgen

Bower

bower install numgen

JSPM

jspm install numgen

SPM

spm install numgen

AMD, <script>

Use dist/numgen.js or dist/numgen.min.js (minified version).

Usage

Node, Component, JSPM, SPM

var NumGen = require("numgen");

Duo

var NumGen = require("gamtiq/numgen");
...

Jam

require(["numgen"], function(NumGen) {
    ...
});

JSPM

System.import("numgen").then(function(NumGen) {
    ...
});

AMD

define(["path/to/dist/numgen.js"], function(NumGen) {
    ...
});

Bower, <script>

<!-- 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>

Example

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.

API

See doc folder.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].