clear-code

    1.0.4 • Public • Published

    it function removed extra charactes use it at

    import clear from "clear-code";

    clear(string, length, entityMap, replases)

    you string

    `string ( string )`
    

    set max length

    `length ( number ) default = 0`
    

    set entityMap default = {'&': '','<': '','>': '','"': '',"'": '','`': '','=': ''}

    `entityMap ( object ) - you string`
    

    set replases default = /[&<>"'`]/g

    `replases ( regular ) - you string`
    

    exapmles defaul settings

    `let result = clear('12`3'45678=', 5)`
         console.log(result) - return 12345
    

    OR use some setting

    let result = clear('12345678', 5, {'4':'g','1':'t'}, /[4,1]/g)`
    console.log(result) - return `t23g5`
    

    Keywords

    none

    Install

    npm i clear-code

    DownloadsWeekly Downloads

    6

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    1.57 kB

    Total Files

    3

    Last publish

    Collaborators

    • vladimir_krupin