{"version":3,"file":"subtract.cjs","names":["purry"],"sources":["../src/subtract.ts"],"sourcesContent":["import { purry } from \"./purry\";\n\n/**\n * Subtracts two numbers.\n *\n * @param value - The number.\n * @param subtrahend - The number to subtract from the value.\n * @signature\n *    subtract(value, subtrahend);\n * @example\n *    subtract(10, 5) // => 5\n *    subtract(10, -5) // => 15\n *    reduce([1, 2, 3, 4], subtract, 20) // => 10\n * @dataFirst\n * @category Number\n */\nexport function subtract(value: bigint, subtrahend: bigint): bigint;\nexport function subtract(value: number, subtrahend: number): number;\n\n/**\n * Subtracts two numbers.\n *\n * @param subtrahend - The number to subtract from the value.\n * @signature\n *    subtract(subtrahend)(value);\n * @example\n *    subtract(5)(10) // => 5\n *    subtract(-5)(10) // => 15\n *    map([1, 2, 3, 4], subtract(1)) // => [0, 1, 2, 3]\n * @dataLast\n * @category Number\n */\nexport function subtract(subtrahend: bigint): (value: bigint) => bigint;\nexport function subtract(subtrahend: number): (value: number) => number;\n\nexport function subtract(...args: readonly unknown[]): unknown {\n  return purry(subtractImplementation, args);\n}\n\n// The implementation only uses `number` types, but that's just because it's\n// hard to tell typescript that both value and subtrahend would be of the same\n// type.\nconst subtractImplementation = (value: number, subtrahend: number): number =>\n  value - subtrahend;\n"],"mappings":"kGAmCA,SAAgB,EAAS,GAAG,EAAmC,CAC7D,OAAOA,EAAAA,MAAM,EAAwB,EAAK,CAM5C,MAAM,GAA0B,EAAe,IAC7C,EAAQ"}