1.0.1 • Published 8 years ago

safe-sheet-name v1.0.1

Weekly downloads
230
License
MIT
Repository
github
Last release
8 years ago

safe-sheet-name Build Status NPM version

Trim Excel sheet names to 31 characters and replace explicitely disallowed characters (\/?*[]) and a few others that may cause issues, including &

Install

$ npm install --save safe-sheet-name

Usage

const safeSheetName = require('safe-sheet-name')

safeSheetName(' [/?*unicorns & rainbows*?\]   unicorns')
//=> 'unicorns  rainbows'

API

safeSheetName(input, options)

input

Type: string

Sheet name.

options

replacement

Type: string Default: ''

Replace disallowed characters with this string.

License

MIT © Pier-Luc Gendreau