parse-ft-spreadsheet-key
Simple function to parse the spreadsheet key out from an FT Google Sheets URL or Bertha URL.
install
front-end
$ bower install --save parse-ft-spreadsheet-key
The function will be available as IG.parseSpreadsheetKey(str)
.
node.js
$ npm install --save-dev parse-ft-spreadsheet-key
var parseSpreadsheetKey = ;
usage
var key = ; // key === '0Ajt08GcPGJRbdFJUZWZfZ6M1V0xDaTFBckJnNENC8Gc'
Notes:
- takes valid Bertha URL or Google Spreadsheets URL
- if you pass a plain key on its own, it will return it untouched
- throws an error if something invalid is found, unless you pass
true
as a second argument (silent
), in which case it just returns null