Registry / development / kiss-framework

kiss-framework

JSON →
library1.3.6jsnpmunverified

A TypeScript decorator-based framework for transforming JSON data into TypeScript objects. Current stable version is 1.3.6, with updates released as needed. Key differentiators include its use of decorators for declarative data processing, support for both CommonJS and ES modules, and a CDN distribution option. It is designed for simple data serialization/deserialization in TypeScript projects.

npm install kiss-framework
INSTALL
IMPORT
SIG · KISS-FRAMEWORK
K
kiss-framework
developmentjavascriptv1.3.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Kiss
import { Kiss } from 'kiss-framework'
const Kiss = require('kiss-framework')
ESM and CommonJS imports differ; require() may cause issues in some bundlers
Entity
import { Entity } from 'kiss-framework'
import Entity from 'kiss-framework'
Entity is a named export, not a default export
Transform
import { Transform } from 'kiss-framework'
import { Transform } from 'kiss-framework/transform'
Transform is part of the main module, no subpath export

Demonstrates creating an entity with transformation and deserializing JSON data.

import { Kiss, Entity, Transform } from 'kiss-framework'; @Entity() class User { @Transform((value: any) => value.toUpperCase()) name!: string; } const data = { name: 'john' }; const kiss = new Kiss(User); const user = kiss.deserialize(data); console.log(user.name); // 'JOHN'
Debug
Known issues
breakingDecorator syntax requires TypeScript 5.0+ and 'experimentalDecorators': true in tsconfig.json
fix
Enable 'experimentalDecorators' in your TypeScript compiler options
affects: >=1.0.0
gotchaClass properties must be explicitly initialized or have definite assignment assertion
fix
Add ! to property declarations or use initializers
affects: >=1.0.0
deprecatedOld import path 'kiss-framework/lib/*' is deprecated since v1.2.0
fix
Use imports directly from 'kiss-framework'
affects: >=1.2.0
Errors
Common errors & fixes
TypeError: Class constructor Kiss cannot be invoked without 'new'
Using Kiss without new keyword in JavaScript
fix
Use 'new Kiss(User)' instead of 'Kiss(User)'
TS7016: Could not find a declaration file for module 'kiss-framework'
Missing TypeScript types when using CommonJS require
fix
Use ESM import syntax or ensure types are installed: npm i --save-dev @types/kiss-framework
Upgrade
Version history
1.3.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
30
OpenAI (training)
1
Resources
kiss-framework — npm install kiss-framework · libregistry