Nautical Poseidon Mythology

    format-error-tool

    1.0.1 • Public • Published

    format-error-tool

    format error

    Install

    npm install format-error-tool
    

    Usage

    var formatError = require("format-error-tool");
    
    /*
    	use case 1, format an error
    		formatError( text, keyValue, json )
    
    	use case 2, make sure return an Error
    		formatError( textOrError )
    */
    //formatError(text, keyValue, json)
    
    var err1= formatError('err1','key1',{a:1,b:2});
    
    assert (
    	err1.message ==='err1, "key1", {"a":1,"b":2}' && err1===formatError(formatError(formatError(err1)))
    );

    Keywords

    Install

    npm i format-error-tool

    DownloadsWeekly Downloads

    9

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    7.53 kB

    Total Files

    6

    Last publish

    Collaborators

    • adf0001