Skip to content

Instantly share code, notes, and snippets.

@theCaptain420
Created December 12, 2018 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theCaptain420/a827190937bcd8a865783b4504a248df to your computer and use it in GitHub Desktop.
Save theCaptain420/a827190937bcd8a865783b4504a248df to your computer and use it in GitHub Desktop.
Own module, skal ligge i sin egen mappe. aka. (own_module). Den hentes via require.
function wattToKwatt(watts){
kilowatts = watts/1000;
return kilowatts
}
exports.calcsWatt = wattToKwatt;
{
"name": "omregner",
"version": "1.0.0",
"description": "Et modul, som der omregner",
"main": "omregner.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/andracs/cvrapi-i-nodejs-eksempel.git"
},
"author": "Mads Nielsen, en datamatikerstuderende i Næstved",
"license": "ISC",
"bugs": {
"url": "https://github.com/andracs/cvrapi-i-nodejs-eksempel/issues"
},
"homepage": "https://github.com/andracs/cvrapi-i-nodejs-eksempel#readme"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment