symbolForMethod method

JSValue symbolForMethod(
  1. List<JSValue> args
)

Symbol.for(key)

Implementation

JSValue symbolForMethod(List<JSValue> args) {
  if (args.isEmpty) {
    throw JSException(JSValueFactory.string('Symbol.for requires a key'));
  }
  final key = args[0].toString();
  return JSSymbol.symbolFor(key);
}