contentmapper

1.0.4 • Public • Published

Content Mapper

===============

Take content from one file, or url, and map it to another via a template.

Usage

Simple example:

Grab the top headline from Reddit and put it into a message.

`var contentUrl = "http://www.reddit.com";
var mappingFcn = function($){
return { headline: $('.content .spacer:last .entry:first a:first').text() };
};
var templateFcn = function(){
return "Top Reddit headline: <%= headline %>!";
};

contentMapper(contentUrl, {
mappingFn: mappingFcn,
template: templateFcn
},function(err,res){ console.log(res); });
`

Install

npm install contentmapper

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    2
  • 1.0.2
    1
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i contentmapper

Weekly Downloads

5

Version

1.0.4

License

BSD

Last publish

Collaborators

  • alexseville