Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

epfl-unit-api

innovativeinnovation100Apache-2.04.0.1

EPFL Unit API

EPFL, api, organisation, unit

readme

EPFL Unit API

EPFL Unit API.

Build Status Coverage Status Apache License 2.0 NPM Version


Install

npm i epfl-unit-api --save

Usage

const epflUnitApi = require('epfl-unit-api');

epflUnitApi.findUnitByName('mws').then((unit) => {
  console.log(unit.code);      // => 13033
  console.log(unit.name);      // => 'Middleware Services'
  console.log(unit.unitPath);  // => 'EPFL VPO VPO-SI ITOP ITOP-MWS'
}).catch((err) => {
  console.log(err);
});

epflUnitApi.findUnitByCode(13030, 'en').then((unit) => {
  console.log(unit.acronym);   // => 'ISAS-FSD'
  console.log(unit.name);      // => 'Full-Stack Development'
  console.log(unit.unitPath);  // => 'EPFL VPO VPO-SI ISAS ISAS-FSD'
}).catch((err) => {
  console.log(err);
});

API

.findUnitByName(unit, language)

Type: function

Returns a Promise with the unit as parameter.

unit

Type: string

The name of an EPFL unit.

language

Type: string
Default: en

Supported languages are English (en) and French (fr).

.findUnitByCode(code, language)

Type: function

Returns a Promise with the unit as parameter.

code

Type: number

The code of an EPFL unit.

language

Type: string
Default: en

Supported languages are English (en) and French (fr).

Contributing

Contributions are always welcome.

See Contributing.

Developer

License

Apache License 2.0

(c) William Belle, 2019-2024.

See the LICENSE file for more details.

changelog

Changelog

v4.0.1 / 2024-05-31

  • Fix findUnitByCode()
  • Test against Node.js 22

v4.0.0 / 2023-12-01

  • Drop support for Node < 16
  • Update dependencies
  • Update Github Actions checkout to v4
  • Update Github Actions setup-node to v4
  • Test against Node.js 21

v3.0.3 / 2023-07-21

  • Update Github Actions coveralls to v2
  • Test against Node.js 20
  • Test against Node.js 19
  • Fix tests after EPFL reorganization

v3.0.2 / 2022-07-01

  • Update dependencies
  • Test against Node.js 18

v3.0.1 / 2022-03-17

  • Fix tests after EPFL reorganization
  • Test against Node.js 17
  • Update dependencies

v3.0.0 / 2021-10-01

  • Drop support for Node < 12
  • Test against Node.js 16
  • Update dev dependencies

v2.0.5 / 2021-03-26

  • Fix tests after EPFL reorganization
  • Update and clean dependencies
  • Migrate from Travis CI to GitHub Actions
  • Remove badge dependencies

v2.0.4 / 2020-11-13

  • Update dependencies
  • Test against Node.js 15
  • Migrate travis-ci.org to .com

v2.0.3 / 2020-06-11

  • Update dependencies
  • Limit files included in package

v2.0.2 / 2020-04-22

  • Update dependencies
  • Test against Node.js 14

v2.0.1 / 2020-01-07

  • Update dependencies

v2.0.0 / 2019-12-01

  • Drop support for Node.js < 10
  • Test against Node.js 13
  • Update dependencies

v1.0.1 / 2019-07-20

  • Improve documentation
  • Update dependencies

v1.0.0 / 2019-05-25

  • First version, released on an unsuspecting world.