Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svgsaver

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svgsaver - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

8

index.js
(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define('SvgSaver', ['exports', 'module', 'FileSaver'], factory);
define('SvgSaver', ['exports', 'module', 'html5-filesaver.js'], factory);
} else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {
factory(exports, module, require('FileSaver'));
factory(exports, module, require('html5-filesaver.js'));
} else {

@@ -13,3 +13,3 @@ var mod = {

}
})(this, function (exports, module, _FileSaver) {
})(this, function (exports, module, _html5FilesaverJs) {
'use strict';

@@ -23,3 +23,3 @@

var _saveAs = _interopRequireDefault(_FileSaver);
var _saveAs = _interopRequireDefault(_html5FilesaverJs);

@@ -26,0 +26,0 @@ var svgStyles = {

{
"name": "svgsaver",
"version": "0.1.1",
"version": "0.1.2",
"description": "download an SVG element with css styles",

@@ -10,3 +10,3 @@ "main": "index.js",

"scripts": {
"babel": "rollup ./src/index.js -g FileSaver | babel -o index.js -m umd --module-id SvgSaver -f ./src/index.js --no-comments",
"babel": "rollup ./src/index.js -e html5-filesaver.js | babel -o index.js -m umd --module-id SvgSaver -f ./src/index.js --no-comments",
"test": "npm run build && karma start",

@@ -36,3 +36,6 @@ "build": "npm run babel",

"watch": "^0.16.0"
},
"dependencies": {
"html5-filesaver.js": "0.0.2"
}
}

@@ -13,2 +13,4 @@ svgsaver

*Currently requires a global version of [eligrey/FileSaver.js/](https://github.com/eligrey/FileSaver.js)*.
### Example

@@ -24,5 +26,5 @@

## Acknowledgments
Some portions of this directive inspired by code from [raw](https://github.com/densitydesign/raw/blob/master/js/directives.js) and [moagrius/copycss](https://github.com/moagrius/copycss).
Based on previous work on [Hypercubed/angular-downloadsvg-directive](https://github.com/Hypercubed/angular-downloadsvg-directive). Some portions of this directive inspired by code from [raw](https://github.com/densitydesign/raw/blob/master/js/directives.js) and [moagrius/copycss](https://github.com/moagrius/copycss).
## License
[MIT License](http://en.wikipedia.org/wiki/MIT_License)

@@ -1,2 +0,2 @@

import saveAs from 'FileSaver';
import saveAs from 'html5-filesaver.js';
import {svgAttrs, svgStyles} from './collection';

@@ -3,0 +3,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc