Nimble Polyglot Microcosm
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    trimmerpublic

    Trimmer

    NPM version Build status Test coverage Greenkeeper badge

    Trim characters from either side of a string.

    Installation

    npm install trimmer --save
    

    API

    var trim = require('trimmer')
    • trim(string [, characters])
    • trim.left(string [, characters])
    • trim.right(string [, characters])

    P.S.: characters can be one of either an string, array or function.

    trim('  test  ') //=> 'test'
    trim.left('  test  ') //=> 'test  '
    trim.right('  test  ') //=> '  test'
     
    trim('test', 't') //=> 'es'
    trim('testing', 'ing') //=> 'test'
    trim.left('test', 't') //=> 'est'
    trim.right('test', 't') //=> 'tes'

    License

    MIT

    install

    npm i trimmer

    Downloadsweekly downloads

    18

    version

    2.0.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar