sapphire-sands-serializer
v1.2.6
Published
A lightweight and efficient data serialization library for complex data structures.
Downloads
6
Maintainers
Readme
Sapphire Sands Serializer
A versatile library for serializing data into various formats and adding encryption for additional security. Utilizes popular libraries like lodash, uuid, moment, crypto-js, and js-yaml for a wide range of functionalities.
Features
- Convert data structures to JSON or YAML format.
- Encrypt data securely using AES encryption.
- Generate unique IDs and timestamps for data entries.
Installation
npm install sapphire-sands-serializer
Usage
const Serializer = require('sapphire-sands-serializer');
// Serialize data to JSON
const jsonData = Serializer.toJson({ hello: 'world' });
console.log(jsonData);
// Serialize data to YAML
const yamlData = Serializer.toYaml({ hello: 'world' });
console.log(yamlData);
// Encrypt data
const encryptedData = Serializer.encryptData({ secret: 'data' });
console.log(encryptedData);
// Generate timestamped data
const timestampedData = Serializer.generateTimestampedData({ some: 'data' });
console.log(timestampedData);
License
This project is licensed under the MIT License.