Socket
Book a DemoInstallSign in
Socket

@synapsestudios/form-schema

Package Overview
Dependencies
Maintainers
9
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synapsestudios/form-schema

A package to help create and export form schema for building dynamic forms

1.6.0
latest
Source
npmnpm
Version published
Weekly downloads
38
-67.24%
Maintainers
9
Weekly downloads
 
Created
Source

form-schema

A library for building and exporting a form schema that can be used to generate dynamic forms

Usage

const FormSchema = require('@synapsestudios/form-schema');
const formSchema = new FormSchema();

// addField with string args. Requires a name and a type
formSchema.addField('name', 'hidden');

// addField with object arg. Requires a name and a type
formSchema.addField({
  name: 'some-great-field',
  type: 'text',
  label: 'Some Greate Field',
  value: 'This is a cool field!',
});

// get the form schema as a plain old javascript object
const schema = formSchema.getFormSchema();

// remove a field by name
formSchema.removeField('some-great-field');

Development

git clone git@github.com:synapsestudios/form-schema.git
cd form-schema
yarn install

FAQs

Package last updated on 28 Apr 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.