Skip to content

syranez/prism-casenotation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prism-casenotation

This modules parses a PRISM CaseNotation and splits it into the known parts.

The syntax of a PRISM Case Notation is shown on http://www.washingtonpost.com/wp-srv/special/politics/prism-collection-documents/

build status

Installation

npm install prism-casenotation

... or to install the package globally:

npm install -g prism-casenotation

Usage

var PrismCaseNotation = require("prism-casenotation");

var yourPersonalCaseNotation = "...";
var caseNotation = PrismCaseNotation(yourPersonalCaseNotation);

console.log("My Provider:    " + caseNotation.provider);
console.log("My ContentType: " + caseNotation.contentType);
console.log("My Source:      " + caseNotation.source);
console.log("My Year:        " + caseNotation.year);
console.log("My Serial:      " + caseNotation.serial);

// Bonus
if (caseNotation.isProvider("Google")) {
    console.log("Shame on you!");
}

License

MIT

About

A PRISM Case Notation parser.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published