UNPKG

ob1

Version:

A small library for working with 0- and 1-based offsets in a type-checked way.

42 lines (40 loc) 582 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true, }); exports.add = add; exports.add0 = add0; exports.add1 = add1; exports.get0 = get0; exports.get1 = get1; exports.inc = inc; exports.neg = neg; exports.sub = sub; exports.sub1 = sub1; function add(a, b) { return a + b; } function sub(a, b) { return a - b; } function get0(x) { return x; } function get1(x) { return x; } function add1(x) { return x + 1; } function sub1(x) { return x - 1; } function neg(x) { return -x; } function add0(x) { return x; } function inc(x) { return x + 1; }