The library file has the extension .jsfx-inc. I tend to define an @init section in that file and add memory definitions (constants, variables, arrays etc) and functions in it. It is very similar to the main JS FX.
The library file is included into the main JS FX using a statement, before any of the sections, such as:
import GUI_controls_DS.jsfx-inc
Oh, and one library file can import another.
----------------------
PS: You would be better off in the specific JS FX forum:
https://forum.cockos.com/forumdisplay.php?f=3