Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Commit

Permalink
docs: comment about trimable chars
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Jan 1, 2021
1 parent 5d67bdd commit 89bb405
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Please join and contribute:

## Trunk

* docs: comment about trimable chars
* refactor: move isCharTrimable

## Version 4.14.2
Expand Down
12 changes: 9 additions & 3 deletions lib/es5/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,18 @@ additional information.
var _require = require('stream'),
Transform = _require.Transform;

var ResizeableBuffer = require('./ResizeableBuffer');
var ResizeableBuffer = require('./ResizeableBuffer'); // white space characters
// https://en.wikipedia.org/wiki/Whitespace_character
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes#Types
// \f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff


var tab = 9;
var nl = 10;
var nl = 10; // \n, 0x0A in hexadecimal, 10 in decimal

var np = 12;
var cr = 13;
var cr = 13; // \r, 0x0D in hexadécimal, 13 in decimal

var space = 32;
var boms = {
// Note, the following are equals:
Expand Down
8 changes: 6 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ additional information.
const { Transform } = require('stream')
const ResizeableBuffer = require('./ResizeableBuffer')

// white space characters
// https://en.wikipedia.org/wiki/Whitespace_character
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes#Types
// \f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff
const tab = 9
const nl = 10
const nl = 10 // \n, 0x0A in hexadecimal, 10 in decimal
const np = 12
const cr = 13
const cr = 13 // \r, 0x0D in hexadécimal, 13 in decimal
const space = 32
const boms = {
// Note, the following are equals:
Expand Down

0 comments on commit 89bb405

Please sign in to comment.