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

ffield

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ffield

Small Node.js library for creating and validating data fields.

  • 0.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ffield

Small Node.js library for creating and validating data fields.


API

ffield

  • ffield
    • ~FIELD_TYPE
    • ~JS_TYPE
    • ~objHasVal(obj, val)boolean
    • ~fieldTypeToJsType(fieldType)string
    • ~validateField(field, fieldValidator)
    • ~createField(fieldType, fieldData)
    • ~updateField(field, newData)Object
    • ~cloneField(field)Object

ffield~FIELD_TYPE

Field data types.

Kind: inner constant of ffield

ffield~JS_TYPE

Representation of native JS types.

Kind: inner constant of ffield

ffield~objHasVal(obj, val) ⇒ boolean

Checks if specified object has a property with the specified value.

Kind: inner method of ffield

ParamType
obj*
val*

ffield~fieldTypeToJsType(fieldType) ⇒ string

Convert field type to native js type.

Kind: inner method of ffield

ParamType
fieldTypestring

ffield~validateField(field, fieldValidator)

Validate a field object.

Kind: inner method of ffield

ParamTypeDescription
fieldObjectField object to validate.
fieldValidatorfunctionFunctional field validator. (true = valid)

ffield~createField(fieldType, fieldData)

Create a field object. Native js type of fieldData must match equivalent fieldType.

Kind: inner method of ffield

ParamTypeDefaultDescription
fieldTypestringField's data type.
fieldData*Field's data content.

ffield~updateField(field, newData) ⇒ Object

Update the data of a field object. (Performs validation on updated field object too.)

Kind: inner method of ffield
Returns: Object - Updated field object.

ParamTypeDefaultDescription
fieldObjectField object to update.
newData*New data to apply to field object.

ffield~cloneField(field) ⇒ Object

Clone a field object. (Performs validation on cloned field object too.)

Kind: inner method of ffield
Returns: Object - Cloned field object.

ParamTypeDescription
fieldObjectField object to clone.

Keywords

FAQs

Package last updated on 29 Jul 2020

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