Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

strman.righttrim

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strman.righttrim - npm Package Compare versions

Comparing version 2.0.0-pre-release-0 to 2.0.0

35

index.js

@@ -6,14 +6,30 @@ var replace = require('strman.replace')

/**
* @module rightTrim
* @description
* Remove all spaces on right.
* @playground
* var rightTrim = require('strman').rightTrim;
* let title = "strman ";
* let result = rightTrim(title);
* @param {String} value - The String!.
* @params {String = ' '} char - if you need remove other char on right boarders.
* @return {String} - String without right boarders spaces.
* ## Install
* Install all functions of strman
* ```sh
* yarn add strman
* ```
* or just the rightTrim function
* ```sh
* yarn add strman.righttrim
* ```
* ## Usage
* ```javascript
* import { rightTrim } from 'strman'
* // OR
* import rightTrim from 'strman.righttrim'
* ```
* @param {String} value The String!
* @param {String} [char = ' '] if you need remove other char on right boarders.
* @example
* const title = 'strman '
* rightTrim(title)
* // => 'strman'
* @returns {String} String without right boarders spaces.
*/
var rightTrim = function rightTrim(value) {
exports.default = function (value) {
var char = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';

@@ -23,3 +39,2 @@ return replace(value, char + '+$', '');

exports.default = rightTrim;
module.exports = exports['default'];
{
"name": "strman.righttrim",
"version": "2.0.0-pre-release-0",
"version": "2.0.0",
"description": "The [strman](https://github.com/dleitee/strman) method `righttrim` exported as a [Node.js](https://nodejs.org/) module.",

@@ -20,3 +20,3 @@ "main": "index.js",

"dependencies": {
"strman.replace":"2.0.0-pre-release-0"
"strman.replace":"2.0.0"
},

@@ -23,0 +23,0 @@ "author": "Daniel Leite de Oliveira <dleitee@gmail.com>",

# strman.righttrim v2.0.0-pre-release-0
# strman.righttrim v2.0.0

@@ -4,0 +4,0 @@ The [strman](https://github.com/dleitee/strman) method `righttrim` exported as a [Node.js](https://nodejs.org/) module.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc