Skip to content

Commit

Permalink
Added using process.env parameter for library info
Browse files Browse the repository at this point in the history
  • Loading branch information
seekayel committed Aug 2, 2022
1 parent 6e63f73 commit 9398848
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import axios from 'axios'
import { v4 as uuid } from 'uuid'
import md5 from 'md5'

const LIBRARY_VERSION = '0.0.1'
const LIBRARY_NAME = 'cyclic-segment'
const LIBRARY_VERSION = process.env.npm_package_version || 'unknown'
const LIBRARY_NAME = process.env.npm_package_name || 'analytics-async'

export async function track(msg) {
return call('track', msg)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "The hassle-free way to integrate analytics into any node application w/o dropping API calls.",
"main": "index.mjs",
"scripts": {
"start": "node index.mjs",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": {
Expand Down

0 comments on commit 9398848

Please sign in to comment.