GithubHelp home page GithubHelp logo

stylixboom / transaction-parser-th Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dtinth/transaction-parser-th

0.0 0.0 0.0 61 KB

Parse transaction information from SMS, notifications, etc...

License: MIT License

JavaScript 10.57% TypeScript 89.43%

transaction-parser-th's Introduction

transaction-parser-th

A JS library that can be used to parse transaction information from SMS messages.

Right now, it supports SMS messages from TrueMoney Wallet and KBANK. Please check out the test cases for supported SMS patterns.

Please help contribute more patterns to make this library more complete!

Example usage: You can set up IFTTT Android SMS service that sends SMS to a web service to automatically track your transactions.

Synopsis

const { parseSMS } = require('transaction-parser-th')

parseSMS(
  '23/06/18 15:20 A/C X555555X Withdrawal195.00 Outstanding Balance4695.81 Baht.',
  'KBank'
)
// => { provider: 'KBANK',
//      type: 'withdraw',
//      date: '2018-06-23',
//      time: '15:20',
//      from: 'A/C X555555X',
//      amount: '195.00',
//      balance: '4695.81' }

parseSMS(
  'ชำระ 90.00บ บัตร x-2866@TOPS CHIDLOM (CENTRAL) 14:39น เหลือ 1,337.55บ'
)
// => { provider: 'KBANK',
//      type: 'pay',
//      amount: '90.00',
//      from: 'x-2866',
//      to: 'TOPS CHIDLOM (CENTRAL)',
//      time: '14:39',
//      balance: '1337.55' }

API

parseSMS(text: string, sender?: string)

Parses SMS information.

transaction-parser-th's People

Contributors

dtinth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.