safe-sheet-name

1.0.1 • Public • Published

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

Dependencies (1)

Dev Dependencies (2)

Package Sidebar

Install

npm i safe-sheet-name

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • zertz