Noncollinear Perpendicular Microcrystalline
    Wondering what’s next for npm?Check out our public roadmap! »

    urlfile

    0.0.0 • Public • Published

    urlfile

    Parse and create .url (bookmark) files

    Usage

    Given a URL file called daveeddy.com.url

    [InternetShortcut]
    URL=http://www.daveeddy.com

    Parse the URL file async

    var urlfile = require('urlfile');
    urlfile.parseURLFile('daveeddy.com.url', function(err, data) {
      // data => 'http://www.daveeddy.com
    });

    Parse the URL file sync

    var urlfile = require('urlfile');
    var url = urlfile.parseURLFileSync('daveeddy.com.url');
    // url => 'http://www.daveeddy.com'

    Parse a URL file string

    var urlfile = require('urlfile');
    var url = urlfile.parseString('[InternetShortcut]\r\nURL=http://www.daveeddy.com');
    // url => 'http://www.daveeddy.com

    Create a URL file string

    var urlfile = require('urlfile');
    var s = urlfile.createURL('http://www.daveeddy.com');
    // s => '[InternetShortcut]\r\nURL=http://www.daveeddy.com'

    Functions

    • urlfile.parseURLFile(file, function(err, data))
    • urlfile.parseURLFileSync(file)
    • urlfile.parseString(string)
    • urlfile.createURL(url)

    The 3 synchronus functions will throw any errors they encounter

    Installation

    npm install urlfile
    

    License

    MIT License

    Keywords

    none

    Install

    npm i urlfile

    DownloadsWeekly Downloads

    3

    Version

    0.0.0

    License

    none

    Last publish

    Collaborators

    • avatar