0.0.58 • Published 6 years ago

util.rstrip v0.0.58

Weekly downloads
28
License
MIT
Repository
github
Last release
6 years ago

util.rstrip

Removes newline characters from the right of a string

build analysis code style: prettier testing NPM

Removes the \n, \r, or \r\n from the end of a string or Buffer and returns the new string.

Installation

This module uses yarn to manage dependencies and run scripts for development.

To install as a development dependency:

$ yarn add --dev util.rstrip

To build the app and run all tests:

$ yarn run all

Example Usage

From String

const rstrip = require('util.rstrip');
let s = rstrip('This is a test\r\n');

// returns the string "This is a test" without newlines

From Buffer

const rstrip = require('util.rstrip');
let buf = new Buffer('This is a test\r\n');
let s = rstrip(buf);

// returns the string "This is a test" without newlines
0.0.58

6 years ago

0.0.57

6 years ago

0.0.55

6 years ago

0.0.56

6 years ago

0.0.54

6 years ago

0.0.53

6 years ago

0.0.51

6 years ago

0.0.52

6 years ago

0.0.50

6 years ago

0.0.49

6 years ago

0.0.48

6 years ago

0.0.47

6 years ago

0.0.46

6 years ago

0.0.45

6 years ago

0.0.44

6 years ago

0.0.43

6 years ago

0.0.42

6 years ago

0.0.41

6 years ago

0.0.40

6 years ago

0.0.39

6 years ago

0.0.38

6 years ago

0.0.37

6 years ago

0.0.36

6 years ago

0.0.35

7 years ago

0.0.34

7 years ago

0.0.33

7 years ago

0.0.32

8 years ago

0.0.31

8 years ago

0.0.30

8 years ago

0.0.29

8 years ago

0.0.28

8 years ago

0.0.27

8 years ago

0.0.26

8 years ago

0.0.25

8 years ago

0.0.24

8 years ago

0.0.23

8 years ago

0.0.22

8 years ago

0.0.21

8 years ago

0.0.20

8 years ago

0.0.19

8 years ago

0.0.18

8 years ago

0.0.17

8 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago