UNPKG

libphonenumber-js

Version:

A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript

13 lines (12 loc) 504 B
// Importing from a ".js" file is a workaround for Node.js "ES Modules" // importing system which is even uncapable of importing "*.json" files. import metadata from '../../../metadata.max.json.js' export default function withMetadataArgument(func, _arguments, resultPrototype) { var args = Array.prototype.slice.call(_arguments) args.push(metadata) var result = func.apply(this, args) if (resultPrototype && result) { Object.setPrototypeOf(result, resultPrototype) } return result }