UNPKG

jc-marked

Version:

Markdown AST (Abstract syntax tree) parser based on finite-state machine (FSM).

1 lines 546 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.arithmeticProgression=void 0;const exceptions_1=require("./exceptions");function arithmeticProgression(e,r,t,o=!0,s=!0){var i=parseInt(t.toString(),10);if(i<0)throw(0,exceptions_1.ValueError)(`The value of parameter "insert" must be greater than 0, but got "${i}"`);var n=parseInt(e.toString(),10),t=parseInt(r.toString(),10),a=(t-n)/(i+1),p=[];o&&p.push(n);for(let e=0;e<i;e++)p.push(n+a*(e+1));return s&&p.push(t),p}exports.arithmeticProgression=arithmeticProgression;