Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
#2980 added ember detection (#3154)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreicristianpetcu authored and yulia committed Jun 13, 2017
1 parent 8c2ed12 commit 9ca652a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/images/Svg.js
Expand Up @@ -17,6 +17,7 @@ const svg = {
jquery: require("./jquery.svg"),
underscore: require("./underscore.svg"),
lodash: require("./lodash.svg"),
ember: require("./ember.svg"),
"magnifying-glass": require("./magnifying-glass.svg"),
"arrow-up": require("./arrow-up.svg"),
"arrow-down": require("./arrow-down.svg"),
Expand Down
1 change: 1 addition & 0 deletions assets/images/ember.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/utils/frame.js
Expand Up @@ -55,6 +55,10 @@ function isLodash(frame) {
return getFrameUrl(frame).match(/lodash/i);
}

function isEmber(frame) {
return getFrameUrl(frame).match(/ember/i);
}

export function getLibraryFromUrl(frame: Frame) {
// @TODO each of these fns calls getFrameUrl, just call it once
// (assuming there's not more complex logic to identify a lib)
Expand Down Expand Up @@ -98,6 +102,10 @@ export function getLibraryFromUrl(frame: Frame) {
if (isLodash(frame)) {
return "Lodash";
}

if (isEmber(frame)) {
return "Ember";
}
}

const displayNameMap = {
Expand Down

0 comments on commit 9ca652a

Please sign in to comment.