Socket
Book a DemoInstallSign in
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
Package was removed
Sorry, it seems this package was removed from the registry

@deliciousbrains/serialized-editor

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

0.1.5
unpublished
latest
Source
npmnpm
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

  • A SerializedParser class to convert a PHP serialized string into JSON
  • 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

vue

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

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.