New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

trim-body

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trim-body

Trim parsed request body or any object that needs its strings trimmed in one go.

latest
Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
22
175%
Maintainers
1
Weekly downloads
 
Created
Source

trim-body

Build Status

Trim parsed request body or any object with strings that needs trimming in one go.

Note: Modifies object in place.

Installation

npm install trim-body

Usage

var trimBody = require('trim-body');

var body = {
  name: {
    first: ' First    ',
    last: '   Last'
  },

  email: '  user@example.com  '
};

trimBody(body);

// body === {
//   name: {
//     first: 'First',
//     last: 'Last'
//   },
//
//   email: 'user@example.com'
// }

Tests

npm install -g mocha

Then,

npm test

License

MIT

Keywords

trim

FAQs

Package last updated on 04 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts