Constructs the object and validates the parameters.
The name used to identify the library (e.g. H5P.Example)
The major version of the library (e.g. 1)
The minor version of the library (e.g. 0)
Static
equalChecks if two libraries are identical.
Static
fromCreates a library object from a library name. Also validates the ubername to protect against attempts to manipulate the server by creating library names.
The library name in a format "H5P.Example-1.0" or "H5P.Example 1.0" (see options)
undefined if the name could not be parsed
Static
toReturns the ubername for a library (e.g. H5P.ExampleLibrary-1.0). Also validates the ubername to protect against attempts to manipulate the server by creating invalid ubernames.
Static
validateStatic
validateThrows an error if the machine name is not valid.
Represents the information needed to identify an installed library. This information is also called ubername when it's represented as a string like this: H5P.Example-1.0 Even though H5P libraries generally also have a patch version (1.0.0), the patch version is not needed to identify an installed library as there can only be one installed patch version of a library at a time. (However, It is possible to install the same library in different major or minor versions. That's why the machine name is not enough to identify it.)