/normalize-empty-string

Normalize empty string with a placeholder value

Primary LanguageJavaScriptMIT LicenseMIT

@crowdbotics/normalize-empty-string NPM version Build Status Dependency Status

String type attributes must have lengths greater than zero while some of the properties from the 3rd API response may contain an empty string. This function will convert those empty string values to 'NULL'.

Installation

$ npm install --save @crowdbotics/normalize-empty-string

Usage

const normalizeEmptyString = require('@crowdbotics/normalize-empty-string');

normalizeEmptyString({
  hello: ''
});

License

MIT © Crowdbotics