
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
ember-cli-sort-by-plus
Advanced tools
An ember.js computed property and helper for sortBy with natural sorting.
This is my first Ember CLI addon. Created as a learning experiment so not sure how useful it will be to you. Feel free to provide feedback though!
The sort-by-plus add-on exposes a sortByPlus computed property which allows you to sort arrays
similary to the sort computed property, but adds support for natural sorting without a custom
sort function (for cases like Ember Data when IDs are strings). You also don't have to define the sort properties as a different property on your object.
import Ember from 'ember';
import sortByPlus from 'ember-cli-sort-by-plus';
const { computed: { sort }} = Ember;
var Thing = Ember.Object.extend({
  plusSort: sortByPlus('model', 'position:desc:natural', 'id:asc:natural'),
  modelSortProperties: ['position:desc', 'id:asc'],
  tradSort: sort('model', 'modelSortProperties')
});
var thing = Thing.create({
  model: [
    { id: "1", position: 1 }
    { id: "2", position: 0 },
    { id: "10", position: 0 }
  ]
});
thing.get('plusSort').mapBy('id')   // => ["1", "2", "10"]
thing.get('tradSort').mapBy('id')   // => ["1", "10", "2"]
ember install ember-cli-sort-by-helpers
git clone <repository-url> this repositorycd ember-cli-sort-by-plusnpm installbower installember servenpm test (Runs ember try:each to test your addon against multiple Ember versions)ember testember test --serverember buildFor more information on using ember-cli, visit http://ember-cli.com/.
FAQs
An ember.js computed property and helper for sortBy with natural sorting.
We found that ember-cli-sort-by-plus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.