Skip to content

Commit dc21f94

Browse files
committed
first commit
0 parents  commit dc21f94

File tree

12 files changed

+249
-0
lines changed

12 files changed

+249
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# node-waf configuration
20+
.lock-wscript
21+
22+
# Compiled binary addons (http://nodejs.org/api/addons.html)
23+
build/Release
24+
25+
# Dependency directory
26+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27+
node_modules
28+
lib

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v5

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
src
3+
.*

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v5

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- "0.12"
4+
- "4"
5+
- "5"
6+
notifications:
7+
email: false

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Leonardo Gatica
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# tracking-parser
2+
3+
[![npm version](https://img.shields.io/npm/v/tracking-parser.svg?style=flat-square)](https://www.npmjs.com/package/tracking-parser)
4+
[![npm downloads](https://img.shields.io/npm/dm/tracking-parser.svg?style=flat-square)](https://www.npmjs.com/package/tracking-parser)
5+
[![dependency Status](https://img.shields.io/david/lgaticaq/tracking-parser.svg?style=flat-square)](https://david-dm.org/lgaticaq/tracking-parser#info=dependencies)
6+
[![Build Status](https://img.shields.io/travis/lgaticaq/tracking-parser.svg?style=flat-square)](https://travis-ci.org/lgaticaq/tracking-parser)
7+
[![devDependency Status](https://img.shields.io/david/dev/lgaticaq/tracking-parser.svg?style=flat-square)](https://david-dm.org/lgaticaq/tracking-parser#info=devDependencies)
8+
[![Join the chat at https://gitter.im/lgaticaq/tracking-parser](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg?style=flat-square)](https://gitter.im/lgaticaq/tracking-parser?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9+
10+
Parse raw data from tracking devices
11+
12+
## Installation
13+
14+
```bash
15+
npm i -S tracking-parser
16+
```
17+
18+
## Use
19+
20+
[Try on Tonic](https://tonicdev.com/npm/tracking-parser)
21+
```js
22+
import tracking from 'tracking-parser'
23+
24+
const raw = new Buffer('$$B6869444005480041|91$GPRMC,194329.000,A,3321.6735,S,07030.7640,W,0.00,0.00,090216,,,A*6C|02.1|01.3|01.7|000000000000|20160209194326|13981188|00000000|32D3A03F|0000|0.6376|0100|7B20\r\n');
25+
const imei = tracking.getImei(raw); // '869444005480041'
26+
```

example.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const tracking = require('tracking-parser');
2+
3+
const raw = new Buffer('$$B6869444005480041|91$GPRMC,194329.000,A,3321.6735,S,07030.7640,W,0.00,0.00,090216,,,A*6C|02.1|01.3|01.7|000000000000|20160209194326|13981188|00000000|32D3A03F|0000|0.6376|0100|7B20\r\n');
4+
const imei = tracking.getImei(raw);

package.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"name": "tracking-parser",
3+
"version": "0.0.1",
4+
"description": "Parse raw data from tracking devices",
5+
"main": "lib",
6+
"scripts": {
7+
"prepublish": "npm run build -s",
8+
"prebuild": "npm run lint -s && npm run clean -s",
9+
"build": "babel src --out-dir lib --source-maps",
10+
"lint": "eslint src",
11+
"clean": "rimraf lib",
12+
"pretest": "npm run build -s",
13+
"test": "mocha --compilers js:babel-core/register"
14+
},
15+
"engines": {
16+
"node": ">=0.12"
17+
},
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/lgaticaq/tracking-parser.git"
21+
},
22+
"keywords": [
23+
"tz-avl",
24+
"meitrack",
25+
"avl",
26+
"gps",
27+
"tracking",
28+
"parser"
29+
],
30+
"author": "Leonardo Gatica <lgatica@protonmail.com> (https://about.me/lgatica)",
31+
"license": "MIT",
32+
"bugs": {
33+
"url": "https://github.com/lgaticaq/tracking-parser/issues"
34+
},
35+
"homepage": "https://github.com/lgaticaq/tracking-parser#readme",
36+
"dependencies": {
37+
"meitrack-parser": "0.0.2",
38+
"tz-parser": "^1.2.0"
39+
},
40+
"devDependencies": {
41+
"babel-cli": "^6.6.0",
42+
"babel-core": "^6.6.0",
43+
"babel-preset-es2015": "^6.6.0",
44+
"chai": "^3.5.0",
45+
"eslint": "2.2.0",
46+
"mocha": "^2.4.5",
47+
"rimraf": "^2.5.2"
48+
},
49+
"eslintConfig": {
50+
"env": {
51+
"es6": true,
52+
"node": true,
53+
"mocha": true
54+
},
55+
"extends": "eslint:recommended",
56+
"parserOptions": {
57+
"sourceType": "module"
58+
},
59+
"rules": {
60+
"indent": [
61+
2,
62+
2
63+
],
64+
"linebreak-style": [
65+
2,
66+
"unix"
67+
],
68+
"quotes": [
69+
2,
70+
"single"
71+
],
72+
"semi": [
73+
2,
74+
"always"
75+
]
76+
}
77+
},
78+
"babel": {
79+
"presets": [
80+
"es2015"
81+
]
82+
},
83+
"tonicExampleFilename": "example.js"
84+
}

0 commit comments

Comments
 (0)