Skip to content

Commit

Permalink
initial revision
Browse files Browse the repository at this point in the history
  • Loading branch information
pirxpilot committed Sep 24, 2023
0 parents commit aedbc84
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: check
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: yarn install
- run: make check
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules/
npm-debug.log
14 changes: 14 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"curly": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"node": true,
"sub": true,
"undef": true,
"unused": true,
"esversion": 11
}
Empty file added History.md
Empty file.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
check: lint test

lint:
./node_modules/.bin/jshint *.js lib test

test:
node --test

.PHONY: check lint test
41 changes: 41 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[![NPM version][npm-image]][npm-url]
[![Build Status][build-image]][build-url]
[![Dependency Status][deps-image]][deps-url]

# @furkot/import-nmea

Import [NMEA] files into Furkot.

## Install

```sh
$ npm install --save @furkot/import-nmea
```

## Usage

Use as a transform stream: pipe network responses, files etc..

```js
const nmea = require('@furkot/import-nmea');
const { body } = await fetch('https://example.com/my.log');
const from = body.pipeThrough(new TextDecoderStream('ascii));
const trip = await nmea(from);
console.log(trip);
```
## License
MIT © [Damian Krzeminski](https://pirxpilot.me)
[NMEA]: https://en.wikipedia.org/wiki/NMEA_0183
[npm-image]: https://img.shields.io/npm/v/@furkot/import-nmea
[npm-url]: https://npmjs.org/package/@furkot/import-nmea
[build-url]: https://github.com/furkot/import-nmea/actions/workflows/check.yaml
[build-image]: https://img.shields.io/github/actions/workflow/status/furkot/import-nmea/check.yaml?branch=main
[deps-image]: https://img.shields.io/librariesio/release/npm/@furkot/import-nmea
[deps-url]: https://libraries.io/npm/@furkot%2Fimport-nmea
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./lib/import');
4 changes: 4 additions & 0 deletions lib/import.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = importNmea;

function importNmea() {
}
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@furkot/import-nmea",
"version": "0.0.0",
"description": "Import NMEA files into Furkot.",
"author": {
"name": "Damian Krzeminski",
"email": "pirxpilot@furkot.com",
"url": "https://pirxpilot.me"
},
"repository": "furkot/import-nmea",
"license": "MIT",
"keywords": [
"import-nmea",
"nmea",
"furkot"
],
"dependencies": {},
"devDependencies": {
"@pirxpilot/jshint": "^3.0.1"
},
"scripts": {
"test": "make check"
},
"files": [
"index.js",
"lib"
]
}
8 changes: 8 additions & 0 deletions test/import.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const test = require('node:test');
const assert = require('node:assert/strict');
const importNmea = require('../');

test.todo('import-nmea must have at least one test', function () {
importNmea();
assert.ok(true, 'Need to write tests.');
});

0 comments on commit aedbc84

Please sign in to comment.