New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@nan0web/core

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nan0web/core

Core application framework for nan0web with database handling, internationalization, and interface connectivity

latest
npmnpm
Version
1.1.2
Version published
Maintainers
1
Created
Source

@nan0web/core

Core application framework for nan0web providing a lightweight DB‑backed state container with built‑in internationalisation.

Installation

How to install with npm?

npm install @nan0web/core

How to install with pnpm?

pnpm add @nan0web/core

How to install with yarn?

yarn add @nan0web/core

Basic usage – AppCore

Create an AppCore instance with a mock DB and inspect its state.

How to instantiate AppCore?

import { AppCore } from "@nan0web/core"
const db = new DB()
const core = new AppCore({ db, title: 'Demo', uri: '/demo', locale: 'en' })
console.info(core.title) // ← Demo
console.info(core.uri) // ← /demo

Internationalisation bootstrap

Load translation JSON from the DB and obtain a translation function.

How does bootstrapI18n load translations?

const db = new DB({
	predefined: [['i18n/uk.json', { hello: 'Вітаю!' }]],
})
await db.connect()
const core = new AppCore({ db, locale: 'uk' })
await core.init()
const result = core.t('hello')
console.info(result) // ← Вітаю!

State inspection

How to retrieve current state?

const db = new DB()
const core = new AppCore({ db })
const state = core.state()

AppResult helper

How to create an AppResult instance?

import { AppResult } from "@nan0web/core"
const res = new AppResult({ content: 'Done', priority: 2, meta: { ok: true } })
console.info(res.content[0]) // ← Done

run() contract

The base run method throws an error – subclasses must implement it.

How does run() behave when not overridden?

const db = new DB()
const core = new AppCore({ db })
await core.run() // ← throws an error → AppCore: run() must be implemented

AppCore Static Meta

Core components like AppCore and ProjectModel implement a static UI metadata block defining their semantic display defaults according to the system contract.

How to get semantic static UI data?

import { AppCore, ProjectModel } from "@nan0web/core"
console.info(`${AppCore.UI.icon} ${AppCore.UI.title}`) // ← ⚙️ Application Core

Contributing

How to contribute? - check here

License

How to license ISC? - check here

Keywords

nan0

FAQs

Package last updated on 29 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts