EPFL Unit API.
npm i epfl-unit-api --save
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);
});
Type: function
Returns a Promise with the unit as parameter.
Type: string
The name of an EPFL unit.
Type: string
Default: en
Supported languages are English (en
) and French (fr
).
Type: function
Returns a Promise with the unit as parameter.
Type: number
The code of an EPFL unit.
Type: string
Default: en
Supported languages are English (en
) and French (fr
).
Contributions are always welcome.
See Contributing.
Apache License 2.0
(c) William Belle, 2019-2024.
See the LICENSE file for more details.