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

@deliciousbrains/serialized-editor

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@deliciousbrains/serialized-editor

A Vue.js component for editing data that has been serialized in PHP

  • 0.1.5
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Serialized Editor

A Vue.js component for editing data that has been serialized in PHP.

Requirements

  • Vue.js 2.x

Install

npm install @deliciousbrains/serialized-editor
// or
yarn add @deliciousbrains/serialized-editor

Usage

The package comes in two parts

  1. A SerializedParser class to convert a PHP serialized string into JSON
  2. A SerializedEditor vue.js component

First you need to import the components:

import { SerializedParser, SerializedEditor } from '@deliciousbrains/serialized-editor';

Next you need to convert the serialized data into JSON:

computed: {
    parsedData() {
        var sp = new SerializedParser(serializedString);

        try {
            var json = sp.parse();
            return JSON.parse(json);
        } catch (e) {
            console.error(e);
        }

        return {};
    }
}

Then you can pass the json-data into the component:

<serialized-editor :json-data="parsedData" @output="updateOutput"></serialized-editor>

API

Props

NameTypeDescription
json-dataObjectThe JSON data returned from the SerializedParser class

Events

NameDescription
outputTriggered when any data changes. Returns the new value in the PHP serialized format.

Credits

Serialized Editor was created by Gilbert Pellegrom from Delicious Brains. Released under the MIT license.

Keywords

FAQs

Package last updated on 28 Jun 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

  • 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