mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* Fix preview error with page parameter * Fix OIDC form support * Fix input border color * Fix some builder inputs * Clear some TODO MIGs * Clean comments * Update snapshot * Fix page title * Fix reactivity issue * refactor: replace individual RadioButtons with a RadioGroup component for choice option type selection. * Fix domain --------- Co-authored-by: Jonathan Adeline <jonathan@baserow.io>
18 lines
446 B
JavaScript
18 lines
446 B
JavaScript
import Papa from 'papaparse'
|
|
|
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
Papa.parsePromise = function (file, config = {}) {
|
|
return new Promise((resolve, reject) => {
|
|
Papa.parse(file, { complete: resolve, error: reject, ...config })
|
|
})
|
|
}
|
|
Papa.arrayToString = (array) => {
|
|
return Papa.unparse([array])
|
|
}
|
|
Papa.stringToArray = (str) => {
|
|
return Papa.parse(str).data[0]
|
|
}
|
|
|
|
return { provide: { papa: Papa } }
|
|
})
|