#15 ✓resolved
Joe Gornick

Array Updates

Reported by Joe Gornick | February 7th, 2009 @ 02:46 AM


Remove aliases:
  all
  any
  collect
  entries
  find
  findAll
  member
  select

Rename methods:
  include -> contains

Remove methods:
  detect -> replaced by first(iterator, context)
  reject

Update methods:
  clone - Add parameter to allow a deep clone
  first - Add parameters to accept either a number or a function
    first(n) - Returns the first n of the list
    first(iterator, context) - Returns the first item when the iterator returns true
  last - Add parameters to accept either a number or a function
    last(n) - Returns the last n of the list
    last(iterator, context) - Returns the last item when the iterator returns true
  reverse - Remove the option to reverse the items inline as this is not consistent

Add methods:
  insert- Add method as a splice helper.

Comments and changes to this ticket

  • Joe Gornick

    Joe Gornick February 7th, 2009 @ 10:33 PM

    Also added a strict parameter to the contains method.

  • Joe Gornick

    Joe Gornick February 7th, 2009 @ 11:55 PM

    Renamed uniq to unique.

  • Joe Gornick

    Joe Gornick February 8th, 2009 @ 12:31 AM

    For this ticket, we are going to skip the Array#clone(deep) option.

  • Joe Gornick

    Joe Gornick February 8th, 2009 @ 01:30 AM

    This commit is in my repository, waiting for it to be merged and updated in main FuseJS repo.

    My commit hash: 9a555d02a176edf1ae46365849bbf09b63ca39cc

  • John-David Dalton
  • John-David Dalton

    John-David Dalton February 9th, 2009 @ 05:41 PM

    (from [062ffe7388a49ec2b19b8313505f7c044aba514e]) fusejs: Updates to Array API [#15 state:resolved] [jddalton, Joe Gornick] Note: Backwards compatibility warning. - Added Array#insert method - Renamed methods: include -> contains, uniq -> unique - Removed methods: detect, reject, reverse - Removed aliases: all, any, collect, entries, find, findAll, member, select

    • Updated methods: Array#contains: Added a strict paramter for strict only comparisons.

    Array#first: Add optional parameters to accept a number/iterator.

     * first(n): Returns an array containing the first n of the list.
     * first(iterator, [context]): Returns first item when iterator
       returns true.
    
    

    Array#last: Add optional parameters to accept a number/iterator.

     * last(n): Returns an array containing the last n of the list.
     * last(iterator, [context]): Returns last item when iterator
       returns true.
    
    

    Signed-off-by: John-David Dalton john.david.dalton@gmail.com http://github.com/jdalton/fusejs...

  • John-David Dalton

    John-David Dalton February 10th, 2009 @ 01:24 AM

    (from [629580b37a4268870f085ce539acd657796db69f]) fusejs: Updates to Array API [#15 state:resolved] [jddalton, Joe Gornick] Note: Backwards compatibility warning. - Added Array#insert method - Renamed methods: include -> contains, uniq -> unique - Removed methods: detect, reject, reverse - Removed aliases: all, any, collect, entries, find, findAll, member, select

    • Updated methods: Array#contains: Added a strict paramter for strict only comparisons.

    Array#first: Add optional parameters to accept a number/iterator.

     * first(n): Returns an array containing the first n of the list.
     * first(iterator, [context]): Returns first item when iterator
       returns true.
    
    

    Array#last: Add optional parameters to accept a number/iterator.

     * last(n): Returns an array containing the last n of the list.
     * last(iterator, [context]): Returns last item when iterator
       returns true.
    
    

    Signed-off-by: John-David Dalton john.david.dalton@gmail.com http://github.com/jdalton/fusejs...

  • John-David Dalton

    John-David Dalton February 10th, 2009 @ 06:37 PM

    (from [7a40d362265b1d992113410bf0ff649782a1b668]) fusejs: Updates to Array API [#15 state:resolved] [jddalton, Joe Gornick] Note: Backwards compatibility warning. - Added Array#insert method - Renamed methods: include -> contains, uniq -> unique - Removed methods: detect, reject, reverse - Removed aliases: all, any, collect, entries, find, findAll, member, select

    • Updated methods: Array#contains: Added a strict paramter for strict only comparisons.

    Array#first: Add optional parameters to accept a number/iterator.

     * first(n): Returns an array containing the first n of the list.
     * first(iterator, [context]): Returns first item when iterator
       returns true.
    
    

    Array#last: Add optional parameters to accept a number/iterator.

     * last(n): Returns an array containing the last n of the list.
     * last(iterator, [context]): Returns last item when iterator
       returns true.
    
    

    Signed-off-by: John-David Dalton john.david.dalton@gmail.com http://github.com/jdalton/fusejs...

  • John-David Dalton

    John-David Dalton February 11th, 2009 @ 12:48 AM

    (from [2e5c673335d76efcbb7c6ae931370e4001a2ffc9]) fusejs: Updates to Array API [#15 state:resolved] [jddalton, Joe Gornick] Note: Backwards compatibility warning. - Added Array#insert method - Renamed methods: include -> contains, uniq -> unique - Removed methods: detect, reject, reverse - Removed aliases: all, any, collect, entries, find, findAll, member, select

    • Updated methods: Array#contains: Added a strict paramter for strict only comparisons.

    Array#first: Add optional parameters to accept a number/iterator.

     * first(n): Returns an array containing the first n of the list.
     * first(iterator, [context]): Returns first item when iterator
       returns true.
    
    

    Array#last: Add optional parameters to accept a number/iterator.

     * last(n): Returns an array containing the last n of the list.
     * last(iterator, [context]): Returns last item when iterator
       returns true.
    
    

    Signed-off-by: John-David Dalton john.david.dalton@gmail.com http://github.com/jdalton/fusejs...

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 ยป

JavaScript frameworks share similar features and functionality such as DOM manipulation, event registration, and CSS selector engines. FuseJS attempts to incorporate the strengths of these frameworks into one stable, efficient, and optimized core JavaScript framework.

People watching this ticket

Referenced by

Pages