Skip to content

Commit

Permalink
fix: no Logger in Ember; fixes #46
Browse files Browse the repository at this point in the history
- replace with console.log
- added sample usage in dummy app
  • Loading branch information
Tom Zellman authored and tzellman committed Mar 14, 2023
1 parent 1ac797a commit 57f01f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions addon/helpers/r/log.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import Ember from 'ember';
import { helper as buildHelper } from '@ember/component/helper';

const {
Logger: { log }
} = Ember;
const log = console.log.bind(console);

export function rLog(params) {
return function (value) {
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/templates/r.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
id="dasherize"
@type="text"
@value={{this.value}}
{{on "keyup" (pipe (r "dasherize" this.value) (fn (mut this.value)))}}
{{on "keyup" (pipe (r/log "in dasherize") (r "dasherize" this.value) (fn (mut this.value)))}}
/>

0 comments on commit 57f01f8

Please sign in to comment.