npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

partial-left

0.1.1

@jonschlinkert

npmHomeRepoSnykSocket
Downloads:3
$ npm install partial-left
DailyWeeklyMonthlyYearly

partial-left NPM version

Returns a function with partially applied arguments that are prepended to the arguments provided to the returned function.

Install

Install with npm

$ npm i partial-left --save

Usage

var partial = require('partial-left');

function resolve(dir, filename) {
  return path.join.apply(path, [].slice.call(arguments));
}

var fn = partial(resolve, 'site', 'blog', 'posts');

fn('index.html')
//=> 'site/blog/posts/index.html'

fn('home.html')
//=> 'site/blog/posts/home.html'

fn('about.html')
//=> 'site/blog/posts/about.html'

Related projects

partial-right: Returns a function with partially applied arguments that are appended to the arguments provided to… more

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

  • github/jonschlinkert
  • twitter/jonschlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on July 13, 2015.