fnamemodify

    0.2.0 • Public • Published

    fnamemodify

    fnamemodify() from Vim for Node.

    fnamemodify({fname}, {mods})

    Modify file name {fname} according to {mods}. {mods} is a string of characters like it is used for file names on the command line. See |filename-modifiers|.

    Example:

    var fnamemodify = require('fnamemodify') 
     
    console.log(fnamemodify("main.c", ":p:h"))
    //=> /Users/dttvb/Projects/fnamemodify

    fnamemodify.extract({fname}{mods})

    Extract the {mods} from the {fname}.

    Example:

    console.log(fnamemodify.extract('%:p:s?a?b?'))
    //=> { fname: '%', mods: ':p:s?a?b?' }

    Keywords

    none

    Install

    npm i fnamemodify

    DownloadsWeekly Downloads

    0

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • dtinth