How to reproduce the behavior of the stringify() method | @vueuse/docs-utils #3708
Unanswered
maxlestage
asked this question in
Q&A
Replies: 1 comment
-
@maxlestage Hi! ' So, the answer on your question will be the source code of target file: import { reactify } from '@vueuse/shared'
import YAML from 'js-yaml'
export const stringify = reactify(
(input: any) => YAML.dump(input, {
skipInvalid: true,
forceQuotes: true,
condenseFlow: true,
noCompatMode: true,
quotingType: '\'',
}),
) To use it in your code you also need to install "js-yaml" package
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a problem with one of the examples it is not possible to use an old vueuse method import { stringify } from '@vueuse/docs-utils' https://github.com/vueuse/vueuse/blob/main/packages/core/useStorage/demo.vue
Do you know what I can replace this stringify with in order to be able to see the changes live as in the example: https://vueuse.org/core/useStorage/
Beta Was this translation helpful? Give feedback.
All reactions