• Stars
    star
    50
  • Rank 557,083 (Top 12 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 2 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

compile-time json-parser

jsonup jsonup

This is a zero dependency compile-time JSON parser written in TypeScript.

Usage

import { JSONUP, ObjectLike } from 'jsonup' // Node
import { JSONUP, ObjectLike } from 'https://esm.sh/jsonup' // Deno

const src = `{ "name": "jsonup" }`

type Str = typeof src      // Type: `'{ "name": "jsonup" }'`
type Obj = ObjectLike<Str> // Type: `{ name: string }`

/**
 * JSONUP.parse infers the type from a given object.
 * The type parameter is optional.
 */
// Type: `{ name: string }` the inferred record type
// Value: `{ name: "jsonup" }` the generated object
let obj = JSONUP.parse(src) 
let obj = JSONUP.parse<Obj>(src)

/**
 * JSONUP.stringify guarantees the semantic equality between 
 * the generated string and the given literal type. 
 * The type parameter is required (maybe).
 */
// Type: `'{ "name": "jsonup" }'` the given literal type
// Value: `'{ "name": "jsonup" }'` the generated string
const str = JSONUP.stringify<Str>(obj) 

Copyright and License

(c) 2022 TANIGUCHI Masaya. https://git.io/mit-license

More Repositories

1

vim-jetpack

The lightning-fast plugin manager, alternative to vim-plug
Vim Script
308
star
2

cheeriogs

Cheerio for Google Apps Script
JavaScript
293
star
3

ddc-fuzzy

Fuzzy matcher, sorter, and conveter for ddc.vim
TypeScript
66
star
4

yomu

英和辞書付きPDF閲覧ソフト
JavaScript
48
star
5

vim-glance

Preview document wrtting in YOUR markdown and asciidoc, POD.
TypeScript
37
star
6

dmacro.nvim

neovim version of dmacro.el, which makes a key macro on-the-fly.
Lua
36
star
7

ts-match

A **true** pattern matching library for JavaScript/ TypeScript
TypeScript
31
star
8

papyrus

A Literate Programming Tool
Common Lisp
26
star
9

lib.deno.dev

TypeScript
26
star
10

cl-skkserv

Common LispによるSKK辞書サーバーとその拡張
Lex
22
star
11

markdown-it-mathjax3

Add Math to your Markdown with a MathJax plugin for Markdown-it
TypeScript
21
star
12

vim-artemis

Compatibility layer for Vim/ Neovim configuration in Lua
Lua
19
star
13

podium

The documentation tools from POD to Markdown/ HTML/ vimdoc/ LaTeX
Lua
19
star
14

hey.vim

hey.vim is a Vim plugin that utilizes the OpenAI API to edit text.
TypeScript
18
star
15

pkgbrew

non-root package manager based on pkgsrc
Shell
17
star
16

vim-typo

Vim-typo is an autocorrection plugin for Vim/Neovim that relies on a syntax file to provide intelligent corrections while typing.
Vim Script
16
star
17

hyper-tunnel

HTTPS tunnel over WSS
JavaScript
16
star
18

gas-minimal-boilerplate

A minimal boilerplate with webpack for Google Apps Script
JavaScript
15
star
19

cl-emoji

cl-emoji provides the Unicode emoji characters.
Common Lisp
14
star
20

UFO

Roswell Script Manager
Common Lisp
13
star
21

cl-pov

CommonLisp binding of the Persistence of Vision Raytracer, or POV-Ray.
Common Lisp
13
star
22

ddc-path

Path completion for ddc.vim. This source collects path names with GNU find or sharkdp/fd.
TypeScript
13
star
23

regex

regular expression engine for CommonLisp
Common Lisp
12
star
24

ddc-git

Git managed files completion for ddc.vim
TypeScript
9
star
25

unasync

Synchronously execute asynchronous functions on browsers, Node.js, and Deno
JavaScript
9
star
26

geo-mirror

This service redirects to the nearest mirror of given distribution
JavaScript
8
star
27

plog

A simple markdown based blog engine
PHP
6
star
28

prose-language-server

A Language server for LanguageTool and write-good
JavaScript
6
star
29

textlint-rule-spelling

A textlint rule for spellings of languages as much as possible
JavaScript
6
star
30

textlint-rule-lsp

textlint rule for langauge server protocol
TypeScript
5
star
31

artistic-code-pro

Artistic Code Pro = Mgen+ + FiraCode + NerdFonts
Python
5
star
32

typography

Project logo generator
HTML
5
star
33

s2.js

LISP to JavaScript. Self-hosting.
JavaScript
5
star
34

wikibox

Modern and Simple CMS inspired by MDWiki
HTML
4
star
35

get-element-by

JavaScript like selector for cl-html-parse
Common Lisp
4
star
36

ddc-onp

DDC filters for An O(NP) Sequence Comparison Algorithm by Sun Wu, Udi Manber and Gene Myers.
TypeScript
4
star
37

pickup.nvim

tani's fuzzy finder
Lua
3
star
38

vim-pdfpreview

TypeScript
3
star
39

acl2-kernel

Jupyter Kernel for ACL2
Jupyter Notebook
3
star
40

bfjit

The esoteric programming language interpreter powered by TCC
Zig
3
star
41

ddc-oldfiles

v:oldfiles completion for ddc.vim You can jump any files in history.
TypeScript
3
star
42

ctrlp-matchfzy

Fast CtrlP matcher using Lua matchfzy() as a replacement of mattn/ctrlp-matchuzzy.
Lua
3
star
43

skkservd

skkserv in Deno
TypeScript
3
star
44

CSIL

LISP implemented in C++
C++
2
star
45

genei-fonts-mirror

The unofficial mirror of GenEi font families
2
star
46

skk-jisyo-latex

SKK JISYO for LaTeX symbols
TypeScript
2
star
47

vip

VIP is a vim plugin manager
TypeScript
2
star
48

BISL

LISP on BEAM
Elixir
2
star
49

rehype-template

JavaScript
2
star
50

tidy-tabs

JavaScript
2
star
51

solv

IPC/CPC theorem prover in Prolog
Prolog
1
star
52

scholar-plus

JavaScript
1
star
53

homebrew-linux

Experimental packages for homebrew/linuxbrew
Ruby
1
star
54

clj-imshow

A implementation of OpenCV's imshow
Clojure
1
star
55

hyper-everforest

JavaScript
1
star
56

docs

Vue
1
star
57

hyper-rigel

JavaScript
1
star
58

deno-template

ejs in sandbox
TypeScript
1
star
59

asciidoctor-shiki

JavaScript
1
star
60

markdown-it-pfm

JavaScript
1
star
61

tau

A trivial typed LISP
Racket
1
star
62

wasser

LISP ❤️ WebAssembly
1
star
63

rehype-inline-css

TypeScript
1
star
64

wikir

to search and view wikipedia
HTML
1
star
65

PDF.gs

extract text from PDF in Google Apps Script
JavaScript
1
star
66

qpdfgrep

Python
1
star