Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #53 from chrishumboldt/dev-rocket
Browse files Browse the repository at this point in the history
Fix to is image method.
  • Loading branch information
chrishumboldt authored Jul 26, 2017
2 parents 5717565 + 34028c7 commit 851f3fb
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Files to ignore
test.html
test.js
test.ts
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
// Files to ignore
test.html
test.js
test.ts
2 changes: 1 addition & 1 deletion build/js/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ var Rocket;
},
image: function (file, arAllowedTypes) {
var allowedTypes = (Rocket.is.array(arAllowedTypes)) ? arAllowedTypes : Rocket.defaults.extensions.images;
return allowedTypes[file.split('.').pop().toLowerCase()];
return (allowedTypes.indexOf(file.split('.').pop().toLowerCase()) > -1);
},
integer: function (check) {
return (Rocket.is.number(check) && (parseFloat(check) === parseInt(check)));
Expand Down
2 changes: 1 addition & 1 deletion build/ts/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ module Rocket {
},
image: (file, arAllowedTypes) => {
let allowedTypes = (is.array(arAllowedTypes)) ? arAllowedTypes : defaults.extensions.images;
return allowedTypes[file.split('.').pop().toLowerCase()];
return (allowedTypes.indexOf(file.split('.').pop().toLowerCase()) > -1);
},
integer: (check) => {
return (is.number(check) && (parseFloat(check) === parseInt(check)));
Expand Down
2 changes: 1 addition & 1 deletion js/tools.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rocket-tools",
"version": "1.14.4",
"version": "1.14.5",
"description": "The Rocket Tools library is a lightweight set of Javascript methods for quicker and easier development.",
"main": "js/tools.min.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion rocket-tools.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ declare module MRocket {
storage: _Storage;
string: _String;
time: _Time;
Url: _Url;
url: _Url;
button: any;
flicker: any;
form: any;
Expand Down

0 comments on commit 851f3fb

Please sign in to comment.