CommonJS, ESModule, INI, JSON, JSON5, TOML, YAML data loader, parser and stringifier
Demo
Platforms
Node, Web, Deno
Install
npm i @grossacasacs/left-phalange
Usage
// Node
import {parse, load, loadAsync, stringify, supportedExtensions} from '@grossacasacs/left-phalange'
// Web
import {parse, stringify} from '@grossacasacs/left-phalange' // should resolve to /dist/browser.es.js
// Deno
import {parse, stringify, load, loadAsync} from 'https://unpkg.com/@grossacasacs/left-phalange/dist/deno.es.js'
load(file[, options])
Loading from a file
- file
- Data file path to load
- options
- Optional
- Type
Object
|String
- Default
{}
- options(
String
)options.type
- options.type
- Data type of
file
- Should be one of
cjs
,esm
,ini
,js
,json
,json5
,toml
,yaml
- Data type of
examples:
load('path/to/data')
load('path/to/data.json')
load('path/to/data', 'yaml')
load('path/to/data', {type: 'toml'})
loadAsync(file[, options])
Promise version of load
parse(string[, options])
Parsing from a string
- string
- type:
String
- string to parse
- type:
- options
- Optional
- Type
Object
|String
- Default
{}
- options(
String
)options.type
- options.type
- Data type of
string
- Default
yaml
- Should be one of
ini
,json
,json5
,toml
,yaml
- Data type of
examples:
parse('{"left": "phalange"}')
parse('{"left": "phalange"}', 'json')
parse('left = "phalange"', {type: 'toml'})
stringify(data[, options])
Creating a string from an object
- data
- Data to stringify
- options
- Optional
- Type
Object
|String
|Boolean
- Default
{}
- options(
String
)options.type
- options(
Boolean
)options.pretty
- options.type
- Data type of
string
- Default
json
- Should be one of
cjs
,esm
,ini
,json
,json5
- Data type of
- options.pretty
- Pretty output
- Default
false
examples:
stringify({left: 'phalange'})
// {"left": "phalange"}
stringify({left: 'phalange'}, 'toml')
// left = "phalange"
stringify({left: 'phalange'}, true)
// {
// "left": "phalange"
// }
stringify({left: 'phalange'}, {type: 'json5', pretty: true})
// {
// left: 'phalange',
// }
Changelog
Related
License
MIT ©
If you want to use the photo it would also be good to check with the artist beforehand in case it is subject to copyright. Best wishes. Aaren Reggis Sela
If you want to use the photo it would also be good to check with the artist beforehand in case it is subject to copyright. Best wishes. Aaren Reggis Sela
If you want to use the photo it would also be good to check with the artist beforehand in case it is subject to copyright. Best wishes. Aaren Reggis Sela
This paragraph is really a nice one it helps new net viewers, who are wishing in favor of blogging. Berte Gaylor Walliw
If some one desires expert view on the topic of running a blog afterward i recommend him/her to pay a visit this webpage, Keep up the nice work. Pam Tammy Micki
Fantastic blog. Really looking forward to read more. Really Cool. Brenda Kenny Taber
Pretty! This was an incredibly wonderful post. Many thanks for providing these details. Ellissa Brandyn Polloch
Appreciation to my father who shared with me about this web site, this webpage is really awesome.
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
You made some nice points there. I looked on the internet for the subject matter and found most individuals will agree with your site.
That is a good tip particularly to those new to the blogosphere. Alla Vidovic Beutler
Helpful information. Lucky me I found your site accidentally, and I am stunned why this coincidence did not happened in advance! I bookmarked it. Maxie Reuven Melodee
While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Sillinger. Riannon Cristiano Jarrell
I have been reading out a few of your stories and i must say pretty clever stuff. I will make sure to bookmark your blog. Jessalyn Jarred Torbert
Article writing is also a fun, if you know afterward you can write otherwise it is complicated to write. Kania Milt Philbin
My brother recommended I might like this web site. He was entirely right. This post truly made my day. Edy Valdemar Wald
Pretty! This was an incredibly wonderful post. Thanks for supplying this information. Selena Freeland Daisie
I just like the helpful information you supply for your articles. Ardisj Ali Boser
Respect to author, some superb selective information. Darcee Samuel Izaak
Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!
The details talked about within the article are a number of the best out there. Edithe Brew Jud
In order to become a good soccer player, you need to learn how to dribble. Libbi Herc Ahoufe
I like and follow your site, thanks
I enjoyed reading a very successful article
Wow, great blog article.Really thank you! Really Great.
Very informative blog article.Much thanks again. Fantastic.
Awesome article post.Much thanks again.
You produce quality content, I appreciate you
I enjoyed reading a very successful article
Wow, great blog article.Really thank you! Really Great.
I read a great article with pleasure, I hope it will continue
What a nice article. It keeps me reading more and more! Kellyann Giffy Nole
Can you tell us more about this? I’d want to find
out some additional information.
There is obviously a bunch to realize about this. I consider you made certain good points in features also. Phylis Layton Roswell
You have brought up a very great details , regards for the post. Betsy Casar Ferdinana
Hello to every one, as I am really eager of reading this weblog’s post to be updated
daily. It includes nice information.
Howdy, i read your blog from time to time and i own a similar one and i was
just wondering if you get a lot of spam remarks? If so how do you reduce it, any plugin or
anything you can advise? I get so much lately
it’s driving me crazy so any support is very much appreciated.
Pretty portion of content. I simply stumbled upon your site and in accession capital to say that I get actually enjoyed account your weblog posts.
Any way I’ll be subscribing to your augment and even I success you get admission to constantly
quickly.
Wonderful blog! I found it while searching on Yahoo News.
Do you have any tips on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there!
Thanks
Thank you for sharing your thoughts. I really appreciate your
efforts and I will be waiting for your next write ups thanks once again.
What’s up, of course this post is truly pleasant
and I have learned lot of things from it on the topic of blogging.
thanks.
Hi there, just became alert to your blog through Google, and found that it is really informative. I am gonna watch out for brussels. I will appreciate if you continue this in future. Many people will be benefited from your writing. Cheers! Nedi Heriberto Thistle
Heya i’m for the first time here. I came across this board and I find
It really useful & it helped me out much. I hope to give something back and aid
others like you helped me.
Hello to every body, it’s my first pay a
visit of this web site; this weblog includes remarkable and in fact fine
stuff for readers.
wonderful issues altogether, you just received a new reader. Cthrine Osborn Adeline
Hi there, I do believe your website could possibly be having web browser compatibility issues. Whenever I take a look at your blog in Safari, it looks fine however when opening in IE, it has some overlapping issues. Anjela Manuel Derron
Hello there, I discovered your site by way of
Google whilst looking for a similar subject, your web site came up, it seems good.
I’ve bookmarked it in my google bookmarks.
Hello there, simply changed into aware of your weblog via Google, and found that it is really informative.
I’m gonna be careful for brussels. I’ll appreciate in the event you proceed this in future.
Numerous other folks can be benefited from your writing. Cheers!
instagram hizmetleri sektorunde kaliteli instagram begeni satin almayi politika edinmis sitemiz uzerinden guvenli bir sekilde instagram begeni satin al