Norvell's Public Machinations
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    fnamemodifypublic

    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

    4

    version

    0.2.0

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar