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

Made by Antonio Ramirez

pre.js

1.4.7

@renjithvk

npmHomeRepoSnykSocket
Downloads:0
$ npm install pre.js
DailyWeeklyMonthlyYearly

Pre.js

Pure JavaScript plugin for preserves spaces and line breaks

Installation

NPM

npm install pre.js --save

In Node.js:

require('pre.js')

Bower

bower install pre.js --save

Direct download from latest releases

Usage

Include

<script src="dist/js/pre.js"></script>

Initialize

new Pre();

Config

new Pre({
    // Options here
    property: value,
    ...
});

Options

PropertyDescriptionAvailable valuesDefault value
elPre.js elementElement selector (string)'.pre'
spacesEnable/Disable spaces preservertrue, false(boolean)false
newlinesEnable/Disable line breaks preservertrue, false (boolean)true

Contribution

  1. Fork and clone the repository
  2. Install development dependencies npm install
  3. Contribute
  4. Build npm run build
  5. Commit and push
  6. Do pull request