Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-moment

Package Overview
Dependencies
Maintainers
6
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-moment - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

tests/helpers/run-append.js

18

app/initializers/ember-moment.js

@@ -7,13 +7,15 @@ import moment from 'ember-moment/helpers/moment';

export var initialize = function(/* container, app */) {
var helper;
var registerHelper;
if (Ember.HTMLBars) {
helper = Ember.HTMLBars._registerHelper;
registerHelper = function (helperName, fn) {
Ember.HTMLBars._registerHelper(helperName, Ember.HTMLBars.makeBoundHelper(fn));
}
} else {
helper = Ember.Handlebars.helper;
registerHelper = Ember.Handlebars.helper;
};
helper('moment', moment);
helper('ago', ago);
helper('duration', duration);
registerHelper('moment', moment);
registerHelper('ago', ago);
registerHelper('duration', duration);
};

@@ -20,0 +22,0 @@

{
"name": "ember-moment",
"dependencies": {
"handlebars": "~1.3.0",
"jquery": "^1.11.1",
"ember": "1.8.1",
"ember": "1.10.0",
"ember-resolver": "~0.1.10",
"loader.js": "stefanpenner/loader.js#1.0.1",
"ember-cli-moment-shim": "jasonmit/ember-cli-moment-shim#0.0.2",
"ember-cli-moment-shim": "jasonmit/ember-cli-moment-shim#0.0.3",
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",

@@ -11,0 +10,0 @@ "ember-cli-test-loader": "ember-cli/ember-cli-test-loader#0.1.1",

@@ -6,3 +6,7 @@ /* jshint node: true */

var app = new EmberAddon();
var app = new EmberAddon({
vendorFiles: {
'handlebars.js': null
}
});

@@ -30,2 +34,4 @@ // Use `app.import` to add additional libraries to the generated

app.import(app.bowerDirectory + '/ember/ember-template-compiler.js');
module.exports = app.toTree();

@@ -0,1 +1,5 @@

### 1.1.1
* [BUGFIX] HTMLBars should use `makeBoundHelper`
### 1.1.0

@@ -2,0 +6,0 @@

{
"name": "ember-moment",
"version": "1.1.0",
"version": "1.1.1",
"description": "Moment.js template helpers for ember",

@@ -25,2 +25,3 @@ "directories": {

"ember-cli-dependency-checker": "0.0.7",
"ember-cli-htmlbars": "^0.7.4",
"ember-cli-ic-ajax": "0.1.1",

@@ -27,0 +28,0 @@ "ember-cli-inject-live-reload": "^1.3.0",

@@ -0,4 +1,7 @@

import Ember from 'ember';
import date from './date';
import moment from 'ember-moment/helpers/moment';
import callHelper from '../../helpers/call-helper';
import { initialize } from '../../../initializers/ember-moment';
import { runAppend, runDestroy } from '../../helpers/run-append';

@@ -25,1 +28,26 @@ module('MomentHelper');

});
test('change date input and change is reflected by bound helper', function() {
initialize();
var context = Ember.Object.create({
date: date(0)
});
var view = Ember.View.create({
template: Ember.HTMLBars.compile('{{moment date}}'),
context: context
});
runAppend(view);
equal(view.$().text(), 'Wednesday, December 31, 1969 7:00 PM');
Ember.run(function () {
context.set('date', date(60*60*24));
});
equal(view.$().text(), 'Wednesday, December 31, 1969 7:01 PM');
runDestroy(view);
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc