Skip to content

Instantly share code, notes, and snippets.

@dmcassel
Created September 15, 2015 18:10
Show Gist options
  • Save dmcassel/185e6baaeeaa10cf075f to your computer and use it in GitHub Desktop.
Save dmcassel/185e6baaeeaa10cf075f to your computer and use it in GitHub Desktop.
// Import the declared exports from the "util" module under the util "namespace".
// Because the path does not start with a / (or C:\ on Windows), resolve
// the module path relative to the current module.
// Because there is no file extension, first try .sjs then .xqy.
// In this case, it resolves to ./util.sjs.
var util = require("util");
// Call the imported function
util.parseCurrency("$44,3829.01");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment