Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

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

install

npm i safe-sheet-name

Downloadsweekly downloads

36

version

1.0.1

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability