Look for the define(
signature of AMD. That's a fairly sure bet. It can be almost anywhere in the file, unfortunately. It's typically at the top or the bottom. There are many variations of AMD modules and several UMD module formats, too: https://github.com/umdjs/umd and https://gist.github.com/unscriptable/4118495.
Fwiw, you can use raw CommonJS modules with curl.js, as well. You have to place your CJS modules into a folder and tell curl that it's a package that uses CJS modules:
curl.config({
packages: [
{ name: 'foo', location: 'path/to/foo-folder', main: 'foo',
config: { moduleLoader: 'curl/loader/cjsm11' }
},
{ name: 'curl', location: 'path/to/curl/src/curl', main: 'curl' }
]
});
You need the curl package (or a path) to tell curl where to find curl/loader/cjsm11.