Skip to content

ULL-ESIT-DSI-1617/scapegoat

 
 

Repository files navigation

Scapegoat

npm version

(for a badge like this see https://badge.fury.io/for/js)

A minimal node module providing utility methods to escape and unescape HTML entities

Installation

  npm install @ull-esit-dsi-1617/scapegoat --save

Usage

  var scapegoat = require('@ull-esit-dsi-1617/scapegoat'),
      escape = scapegoat.escape,
      unescape = scapegoat.unescape;

  var html = '<h1>Hello World</h1>',
      escaped = escape(html),
      unescaped = unescape(escaped);

  console.log('html', html, 'escaped', escaped, 'unescaped', unescaped);

Tests

   npm test

See also Repo ULL-ESIT-DSI-1617/prueba-scapegoat to test this module

See also the main repo made of this repo and the prueba repo

API Documents

See Documentation at https://ull-esit-dsi-1617.github.io/scapegoat/

To generate the docs we use documentation.js:

   npm run doc

Install $ npm install -g documentation

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 1.0.3 Scopes and API documentation
  • 1.0.0 Refactor to avoid double unescape and to use npm scripts instead of makefile. Also add link to associated blog post.
  • 0.1.0 Initial release

About

A minimal node module providing utility methods to escape and unescape HTML entities

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%