Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed emboss to extrude, arrays tested with Array.isArray #1

Closed
wants to merge 1 commit into from

Conversation

rcmaniac25
Copy link
Contributor

Most graphical applications, such as Maya and 3D Studio Max use the term "extrude" instead of "emboss".
Instead of using toString to test if an object type is an array, use the Array class's isArray function to perform the test.

Changed testing if an object is an array from checking toString type to using Array.isArray
@@ -6,7 +6,7 @@
(function (exports) {

function Path(points) {
if (Object.prototype.toString.call(points) === '[object Array]') {
if (Array.prototype.isArray.call(points)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You really only need Array.isArray(points) here, but this is somewhat non-canonical (IE > 8).

Object.prototype.toString is super airtight.

@jdan
Copy link
Owner

jdan commented Apr 26, 2014

Landed in bcb83c7. Thanks 🌟

@jdan jdan closed this Apr 26, 2014
@rcmaniac25
Copy link
Contributor Author

Cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants