Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

plutonio

Package Overview
Dependencies
Maintainers
0
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plutonio

A typescript library that scans your typescript project and generate a schema of all types and interfaces of the project.

  • 0.6.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
0
Weekly downloads
 
Created
Source

Plutonio

Plutonio is a Typescript library that scans your typescript project and generate a schema of all types and interfaces of the project.

The schema is the following:

type Schema = {
    name: string;
    category: Category;
    type: Primitive;
    original?: string;
    enum?: string[];
    imports: Import[];
    properties?: {
        [k:string]: Schema
    }
};

type Category = 'type' | 'interface';

type Primitive =
  | 'any';
  | 'boolean'
  | 'null'
  | 'number'
  | 'object'
  | 'string'
  | 'undefined'

An example of a schema is the following:

const schema = {
    name: 'Product',
    category: 'interface',
    type: 'object',
    original: 'export interface Product extends Foo.Boo {title: string, price: number}',
    properties: {
        title: {
            type: 'string',
        },
        price: {
            type: 'number',
        },
    },
    imports: [
        {
            text: 'import Foo from "foo"',
            module: 'foo',
            clause: 'Foo',
            specifiers: [],
        },
    ],
},
};

FAQs

Package last updated on 15 Sep 2024

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