
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
ember-version-is
Advanced tools
Dead simple in browser Ember / Ember Data version checker. Works with Ember Addons.
A super simple set of helpers designed to give Ember Addon developers a clean way of supporting multiple Ember & Ember Data versions.
It's basically a thin wrapper on Semver.
# In your Addon...
npm install ember-version-is --save
Then in your Addon's index.js
:
/* jshint node: true */
'use strict';
module.exports = {
name: 'ember-infinity',
/* Necessary Hack until Ember CLI supports nested addons. */
included: function(app) {
this.addons.forEach(function(addon){
if (addon.name === "ember-version-is") {
addon.included.apply(addon, [app]);
}
});
}
};
Then anywhere in your codebase, you can do:
import Ember from 'ember';
import emberVersionIs from 'ember-version-is';
import { emberDataVersionIs } from 'ember-version-is';
export default Ember.Route.extend({
model() {
let promise;
if (emberDataVersionIs('lessThanOrEqualTo', "1.13.0")) {
promise = this.store.find('product', 1);
} else {
promise = this.store.query('product', 1);
}
return promise.then(response => {
if (emberVersionIs('equalTo', "2.0.0")) {
Ember.warn("You are using Ember 2.0. That is rad.");
}
});
}
});
If you'd like to check arbitary versions of things, you can do that too:
import Ember from 'ember';
import { is } from 'ember-version-is';
const VERSION = '0.2.3';
export default Ember.Route.extend({
activate() {
if (is(VERSION, 'lessThanOrEqualTo', '0.2.5')) {
this.set('techno', 'is making a comeback');
}
}
});
SemVer ranges are supported as
well (works for is
, emberVersionIs
and emberDataVersionIs
):
import Ember from 'ember';
import { is } from 'ember-version-is';
const VERSION = '0.2.8';
export default Ember.Route.extend({
activate() {
if (is(VERSION, '<= 0.2.5 || 0.2.8')) {
this.set('techno', 'is making a comeback');
}
}
});
FAQs
Dead simple in browser Ember / Ember Data version checker. Works with Ember Addons.
The npm package ember-version-is receives a total of 82 weekly downloads. As such, ember-version-is popularity was classified as not popular.
We found that ember-version-is 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.