1.1.0 • Published 6 years ago

strjson v1.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

StrJson

What is strjson?

StrJson is a simple json thing... You can convert from string json :P

For example:

var strjson = require('strjson');

strjson.toJSON.array('(1|2|3|4|data|idk|this is a array lol)', (res) => {
    console.log(res)
})

This code will log : ["1", "2", "3", "4", "data", "idk", "this is a array lol")

You can only arrays? Nooooo, you can do the same thing with objects!

var strjson = require('strjson');

strjson.toJSON.object('(andrew:da|vieruu:nu)', (res) => {
    console.log(res)
})

This code will log : {andrew:da, vieruu:nu}