New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ylenia

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ylenia

TypeScript-DataSources for JSON. Generates dynamic TypeScript-Classes and JSON-Files.

  • 0.1.22
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-73.68%
Maintainers
1
Weekly downloads
 
Created
Source

Ylenia

TypeScript-Code- and JSON-Generator. Based on a Definition in a JSON-File, this DataSource-Object generates for each DataSource a JSON-Source-File to store and two TypeScript-Classes to access and work data.

JSON-File

The generated JSON-Files are ready to contain all data, defined in Definition-File. You don't have to think about the structure because you only access the data with the following two TypeScript-Files:

TypeScript-Files

Ylenia generates two TypeScript-Files with one Class each. One Class represents the object, for Example "Attribute". The other Class is a Controller to work with the Object-Class, for Example "Attributes".

Object-Class

Let's say we define an Object which represents a Person and contains a Pre- and a Lastname. The Object-Class contains the Data and all Get- and Set-Methods.

Controller-Class

The Controller-Class contains an Array of Objects, based on the Object-Class. It also contains some Default-Methods:

  • add
  • addProtected (Does not add, if the Object already exists)
  • exist
  • get
  • getAll
  • load
  • remove
  • save

Import

import {DataSources} from "ylenia";
let ds = new DataSources("./definition.json");

Keywords

FAQs

Package last updated on 09 Oct 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc