Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
programming-exercise-juezlti
Advanced tools
Readme
YAPEXIL is a JSON format in which the goal is to represent in an orthodoxy manner Programming exercises. This type of representation although efficient could sometimes lead to a complexity that can not be handled by a non-expert in this schema. Therefore this npm package focusing in:
For loading an exercise placed remotely on the internet do the following:
loadSchemaYAPEXIL().then(() => {
ProgrammingExercise.loadRemoteExercise(learningObject, {
'BASE_URL': process.env.BASE_URL,
'EMAIL': process.env.EMAIL,
'PASSWORD': process.env.PASSWORD,
}).then((programmingExercise) => {
//...stuff
})
})
First, it is necessary to load the schema to evaluate the JSON that will be fetched. The 'loadSchemaYAPEXIL' method does not generate overhead when called multiple times as this method implements a cache. When the script knows the form of the YAPEXIL Schama it is possible to fetch an exercise in this format by doing 'ProgrammingExercise.loadRemoteExercise'. This method will then load an exercise remotely and expose the exercise as an instance of the ProgrammingExercise class.
The ProgrammingExercise class besides making possible the fetch of remotely exercise also makes it possible to load exercise from your file system. To achieve this just do the following
loadSchemaYAPEXIL().then(() => {
ProgrammingExercise.deserialize(path_to_zip_folder_exercise), `${learningObject}.zip`)
.then((programmingExercise) => {
//...stuff
}).catch((error) => {
//...stuff
})
})
When bandwidth savings or other reasons are needed to persist the exercise, this can be achieved by calling the serialization method on an instance of the Programming Exercise class
programmingExercise.serialize(path_to_folder).then(() => {
//...stuff
}).catch((err) => {
//...stuff
});
})
In order to create an exercise programmatically, the user needs to have in his possession the correct values that fit the YAPEXIL schema. More information about the schema could be found at YAPEXIL Github
To install this package you just need to do
npm i programming-exercise-juezlti
MIT
Free Software, Hell Yeah!
FAQs
A class that abstract a YAPEXIL schema also allows to serialize and deserialize exercise as well load remotely
The npm package programming-exercise-juezlti receives a total of 148 weekly downloads. As such, programming-exercise-juezlti popularity was classified as not popular.
We found that programming-exercise-juezlti demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.