node package manager
Stop writing boring code. Discover, share, and reuse within your team. Create a free org »

superfactorial

superfactorial

Node.js JavaScript module to calculate the superfactorial value of a number.

npm install superfactorial

Syntax

sf(value);

Parameters

  • value The positive number value to calculate.

Return value

number superfactorial of value.

Examples

const sf = require('superfactorial');
 
console.log( sf(0) ); // 1
console.log( sf(1) ); // 1
console.log( sf(2) ); // 2
console.log( sf(3) ); // 12
console.log( sf(4) ); // 288
console.log( sf(5) ); // 34560