Skip to content

Commit

Permalink
add worker support, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner committed Apr 11, 2014
1 parent 5e0433d commit b4e3f59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "simplify-js",
"version": "1.2.0",
"version": "1.2.1",
"description": "A high-performance JavaScript 2D/3D polyline simplification library",
"homepage": "http://mourner.github.com/simplify-js/",
"author": "Vladimir Agafonkin",
Expand Down
3 changes: 2 additions & 1 deletion simplify.js
Expand Up @@ -122,9 +122,10 @@ function simplify(points, tolerance, highestQuality) {
return points;
}

// export as AMD module / Node module / browser variable
// export as AMD module / Node module / browser or worker variable
if (typeof define === 'function' && define.amd) define(function() { return simplify; });
else if (typeof module !== 'undefined') module.exports = simplify;
else if (typeof self !== 'undefined') self.simplify = simplify;
else window.simplify = simplify;

})();

0 comments on commit b4e3f59

Please sign in to comment.