Skip to content

Instantly share code, notes, and snippets.

View sayanriju's full-sized avatar

Sayan "Riju" Chakrabarti sayanriju

View GitHub Profile
@sayanriju
sayanriju / curry.js
Last active March 5, 2017 14:13 — forked from kevincennis/curry.js
curry.js
function curry( fn, arity ) {
//var arity = fn.length;
return (function resolver() {
let mem = Array.prototype.slice.call( arguments );
return function() {
let args = mem.slice();
Array.prototype.push.apply( args, arguments );
return ( args.length >= arity ? fn : resolver ).apply( null, args );
};
@sayanriju
sayanriju / README.md
Created May 18, 2017 18:32 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@sayanriju
sayanriju / README.md
Last active July 2, 2022 19:07 — forked from RobK/serial.js
Generate Random Serial Keys

Synopsis

This is a simple package to generate (pseudo) random strings of specified length separated into "blocks" of specified blockLengths by specified separator characters. This makes this package suitable for generating license or product or serial keys.

The similar looking characters (and numbers) I, 1, 0 and O are always left out of the generated strings to avoid confusion.

Note that the generated keys are just random strings and there's no provision to check their validity cryptographically.

Installation

From npm registry: