front-matter-extractor
Separate front-matter from content
Last updated 11 years ago by 75lb .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install front-matter-extractor 
SYNC missed versions from official npm registry.

view on npm npm module downloads per month Dependency Status Analytics

front-matter-extractor

install:

$ npm install -g front-matter-extractor

this code:

var fme = require("front-matter-extractor");
var extracted = fme.extract(input);

where input is a string containing:

---
title: something
date: 2013-10-20
words:
    - this
    - that
---
blah blah blah

sets extracted to the following object:

{
    title: "something",
    date: Mon Oct 20 2013 00:00:00 GMT+0000 (GMT),
    words: [ 'this', 'that' ],
    _remainder: "blah blah blah"
}

Current Tags

  • 1.1.0                                ...           latest (11 years ago)

15 Versions

  • 1.1.0                                ...           11 years ago
  • 1.0.9                                ...           12 years ago
  • 1.0.8                                ...           12 years ago
  • 1.0.7                                ...           12 years ago
  • 1.0.6                                ...           12 years ago
  • 1.0.5                                ...           12 years ago
  • 1.0.4                                ...           12 years ago
  • 1.0.3                                ...           12 years ago
  • 1.0.2                                ...           12 years ago
  • 1.0.1                                ...           12 years ago
  • 1.0.0                                ...           12 years ago
  • 0.0.3                                ...           12 years ago
  • 0.0.2                                ...           12 years ago
  • 0.0.1                                ...           12 years ago
  • 0.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 8
Last Day 0
Last Week 8
Last Month 2
Dependencies (1)
Dev Dependencies (0)
None
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |