#86 ✓resolved
MadRabbit

Options#cutOptions

Reported by MadRabbit | September 25th, 2009 @ 03:00 PM | in 1.5.0 Release

For the cases when a constructor or a method might take various number arguments with the options at the end, this method will cut off the options feed to the #setOptions method and return the list of arguments without the options

cutOptions(args) {
var args = $A(args); if (isHash(args)) this.setOptions(args.pop());

return args; }

myMethod: function() {
var args = this.cutOptions(arguments);

..... }

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RightJS Core Tickets

Shared Ticket Bins

People watching this ticket

Tags

Pages