Skip to content

Commit

Permalink
fix(deps): update doogu to v4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bent10 committed Aug 27, 2024
1 parent 98b3695 commit 2cc58a5
Show file tree
Hide file tree
Showing 7 changed files with 1,054 additions and 1,307 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: Release
on:
repository_dispatch:
# curl -v -H "Accept: application/vnd.github.everest-preview+json" -H "Authorization: token ${GH_TOKEN}"
# https://api.github.com/repos/bent10/json-loose/dispatches -d '{ "event_type": "semantic-release" }'
types: [semantic-release]
push:
branches:
- main
Expand All @@ -29,7 +25,8 @@ jobs:

- name: Installing release dependencies
run: |
npm i -D semantic-release @semantic-release/changelog @semantic-release/git
npm i -g semantic-release @semantic-release/changelog @semantic-release/git
- name: Semantic release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'doogu/eslint.config.js'
71 changes: 51 additions & 20 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,57 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>JSON loose</title>

<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap-reboot.min.css"
/>
<style>
.content {
max-width: 760px;
margin: 0 auto;
padding: 3rem 1rem;
}

pre {
margin-bottom: 3rem;
padding: 1rem;
background-color: var(--bs-secondary-bg);
border-radius: 0.5rem;
}
</style>
</head>

<body>
<h1>Open your browser console to see the result!</h1>
<div class="content">
<h2>Input</h2>
<pre id="input"></pre>

<h2>Output</h2>
<pre id="output"></pre>
</div>

<script src="https://cdn.jsdelivr.net/npm/moo/moo.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/json-loose/dist/index.umd.js"></script>
<script>
const input = `[
"foo",
true,
[1, 2, wife],
{
[n]: 'Bambang Ekalaya',
username: "@palgunadi",
age: 30,
address: [{city:city}, [country]],
skills: skills,
isStudent: true,
relation: {
wife: wife,
guru: guru,
[bar]: "qux"
},
},
],
`
"foo",
true,
[1, 2, wife],
{
[n]: 'Bambang Ekalaya',
username: "@palgunadi",
age: 30,
address: [{city:city}, [country]],
skills: skills,
isStudent: true,
relation: {
wife: wife,
guru: guru,
[bar]: "qux"
},
},
]`

const context = {
n: "name",
Expand All @@ -41,8 +65,15 @@ <h1>Open your browser console to see the result!</h1>
wife: "Anggraini",
guru: "Drona"
}
const output = JSON.parse(jsonLoose(input, context))

console.log(JSON.parse(jsonLoose(input)))
console.log(output)
document.querySelector("#input").textContent = input
document.querySelector("#output").textContent = JSON.stringify(
output,
null,
2
)
</script>
</body>
</html>
Loading

0 comments on commit 2cc58a5

Please sign in to comment.