0.7.2 • Published 6 years ago
linealysis v0.7.2
Linealysis
Linealysis is a simple Javascript/Typescript module for transforming chat history exported from Line into convenient immutable objects that can be used for personal projects.
const fs = require('fs')
const MessageParser = require('linealysis').MessageParser
const history = fs.readFileSync('my_line_chat_history.txt').toString()
const parser = new MessageParser()
const messages = parser.parseText(history)
console.log(messages)
Messages are simple objects with three properties.
type Message {
date: Date,
sender: string,
content: string
}