Skip to content

Commit

Permalink
Small updates to the array helper
Browse files Browse the repository at this point in the history
  • Loading branch information
poteto committed Apr 27, 2016
1 parent 7f66f36 commit ade3075
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Expand Up @@ -91,6 +91,7 @@ For action helpers, this will mean better currying semantics:
+ [`append`](#append)
+ [`chunk`](#chunk)
+ [`without`](#without)
+ [`array`](#array)
* [Object](#object-helpers)
+ [`group-by`](#group-by)
* [Math](#math-helpers)
Expand Down Expand Up @@ -541,6 +542,17 @@ Returns the given array without the given item(s).

**[⬆️ back to top](#available-helpers)**

#### `array`
Similar to the `hash` helper, this lets you compose arrays directly in the template:

```hbs
{{#each (array 1 2 3) as |numbers|}}
{{numbers}}
{{/each}}
```

**[⬆️ back to top](#available-helpers)**

---

### Object helpers
Expand Down
4 changes: 2 additions & 2 deletions addon/helpers/array.js
@@ -1,8 +1,8 @@
import Ember from 'ember';
import { helper } from 'ember-helper';
import { A as emberArray } from 'ember-array/utils';

export function array(params) {
return emberArray(params);
}

export default Ember.Helper.helper(array);
export default helper(array);
1 change: 1 addition & 0 deletions addon/index.js
@@ -1,4 +1,5 @@
export { default as AppendHelper } from './helpers/append';
export { default as ArrayHelper } from './helpers/array';
export { default as CamelizeHelper } from './helpers/camelize';
export { default as CapitalizeHelper } from './helpers/capitalize';
export { default as ChunkHelper } from './helpers/chunk';
Expand Down

0 comments on commit ade3075

Please sign in to comment.