Nocturnal Practitioners of Magic

    typesafe-maths

    1.2.4 • Public • Published

    typesafe-maths

    Mathematics, but in a type safe manner!

    const { add, substract, multiply, divide } = require('typesafe-maths');
    
    add(2, 3) // 5
    add('two', '3') // 5
    multiply('one million', 2) // 2,000,000
    

    This was inpired by this tweet and really is a 5 line wrapper around text-to-number. Please do not use this ever. Thanks.

    Keywords

    Install

    npm i typesafe-maths

    DownloadsWeekly Downloads

    14

    Version

    1.2.4

    License

    ISC

    Unpacked Size

    2.3 kB

    Total Files

    6

    Last publish

    Collaborators

    • walaura