npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shadowly

v1.0.6

Published

TypeScript JSON Database

Readme

Shadowly

TypeScript로 만든 체이닝 JSON 데이터베이스 모듈

시작하기

  • 패키지 설치

npm i shadowly

사용법

새 JSON 만들기

generateNewJson 함수로 JSON을 새로 만들 수 있습니다.
|파라메터|타입|설명| |------|--------|-------| |path|string|만들 파일 경로| |isArray|boolean?|true면 배열 형식으로 생성|

import Shadowly from 'shadowly';

// example.json을 Object 형식으로 새로 만듭니다. (파일 내용: {})
Shadowly.generateNewJson("./object.json");

// array.json을 Array 형식으로 새로 만듭니다. (파일 내용: [])
Shadowly.generateNewJson("./array.json", true);

Shadowly 인스턴스 만들기

new Shadowly()로 Shadowly의 인스턴스를 새로 만들 수 있습니다. |파라메터|타입|설명| |------|--------|-------| |path|string|JSON 파일 경로|

import Shadowly from 'shadowly';

// object.json을 읽어들여 Shadowly의 인스턴스를 새로 만듭니다.
new Shadowly("./object.json");

// JSON의 타입 정의를 할 수 있습니다.
new Shadowly<typeof import("./array.json")>("./array.json");

JSON의 값 가져오기

get 함수는 특정 키로 이동합니다. |파라메터|타입|설명| |------|--------|-------| |key|string or number|키 이름입니다.|

import Shadowly from 'shadowly';

// key -> key2로 이동합니다.
new Shadowly("./object.json")
    .get("key")
    .get("key2");

value 함수는 이동한 키의 값을 가져옵니다.

import Shadowly from 'shadowly';

// key의 값을 가져옵니다.
new Shadowly("./object.json")
    .get("key")
    .value();

JSON에 값 쓰기

set 함수는 특정 키에 씁니다. |파라메터|타입|설명| |------|--------|-------| |value|any|쓸 값입니다.|

import Shadowly from 'shadowly';

// key 안에 있는 key2에 value2를 씁니다.
new Shadowly("./object.json")
    .get("key")
    .get("key2")
    .set("value2");

/*
결과:
{
    "key": {
        "key2": "value2"
    }
}
*/

remove 함수는 특정 키를 지웁니다. |파라메터|타입|설명| |------|--------|-------| |key|string or number|키 이름입니다.|

import Shadowly from 'shadowly';

// key 안에 있는 key2를 지웁니다.
new Shadowly("./object.json")
    .get("key")
    .remove("key2");

/*
결과:
{
    "key": {}
}
*/

그 외

back 함수는 한 번 뒤로 갑니다.

import Shadowly from 'shadowly';

// key 안에 있는 값을 가져옵니다.
// key에서 key2로 이동 후 뒤로가기 한 다음 값 가져오기
new Shadowly("./object.json")
    .get("key")
    .get("key2")
    .back()
    .value();

up 함수는 여러 번 뒤로 갑니다. |파라메터|타입|설명| |------|--------|-------| |steps|number?|뒤로 갈 횟수입니다.|

import Shadowly from 'shadowly';

// JSON 데이터를 가져옵니다.
// key에서 key2로 이동 후 뒤로 2번 이동 한 다음 값 가져오기
new Shadowly("./object.json")
    .get("key")
    .get("key2")
    .up(2)
    .value();

root 함수는 루트로 이동합니다.

import Shadowly from 'shadowly';

// JSON 데이터를 가져옵니다.
// key에서 key2로 이동 후 루트로 이동 한 다음 값 가져오기
new Shadowly("./object.json")
    .get("key")
    .get("key2")
    .root()
    .value();