New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

iconic

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iconic - npm Package Compare versions

Comparing version 0.1.0 to 0.1.2

1

lib/icon.js

@@ -203,2 +203,3 @@ 'use strict';

fs.writeFileSync(filename, content);
return content;
})

@@ -205,0 +206,0 @@ }

@@ -16,6 +16,15 @@ 'use strict';

_.extend(manager, {
createManager (path) {
return new Manager(path);
},
Manager,
Collection,
Icon,
Pack,
});

2

lib/pack.js

@@ -143,3 +143,3 @@ 'use strict';

fs.writeFileSync(output, self.compileSprite());
return resolve();
if (!minify) { return resolve(); }

@@ -146,0 +146,0 @@ var icon = new Icon('sprite', output);

{
"name": "iconic",
"version": "0.1.0",
"version": "0.1.2",
"main": "./lib/index.js",

@@ -29,6 +29,7 @@ "description": "Tools for SVG-icons manipulation and icon packs",

"lodash": "^4.15.0",
"qdir": "^0.0.5",
"qdir": "*",
"svgo": "^0.6.6",
"tfile": "0.0.3",
"wrench": "^1.5.9"
}
}
# iconic
Tools for SVG-icons manipulation and icon packs
## API
### Iconic
```js
const iconic = require('iconic');
iconic.createManager(path);
```
### Manager
```js
const iconic = require('iconic');
var pack = iconic.createPack();
var collections = iconic.collections
var collections = iconic.getCollections();
var collection = iconic.getCollection('computer-workers');
var icon = iconic.getIcon('computer-workers.computer-worker-on-back-view');
```
### Collection
```js
const iconic = require('iconic');
var icons = collection.icons;
var icons = collection.getIcons();
var icon = collection.getIcon('computer-worker-on-back-view');
var isExists = collection.exists;
var isExists = collection.isExists();
```
### Icon
```js
const iconic = require('iconic');
var isExists = icon.exists;
var isExists = icon.isExists();
var code = icon.source;
var code = icon.getSource();
var code = icon.resize(w, h);
var code = icon.getPath();
var code = icon.clear();
var code = icon.normalize(w, h);
var code = icon.shape;
var code = icon.getShape();
var isFileNormalized = icon.isFileNormalized();
icon.saveFile();
icon.normalizeFile();
var buffer = icon.toPng(w, h);
icon.savePng(filename, w, h);
icon
.toJpeg(w, h, background)
.then(data => {});
icon
.saveJpeg(filename, w, h, background)
.then(data => {});
icon.saveAs(filename);
icon.minify().then(code => {});
icon.minifyFile().then(code => {});
```
### Pack
```js
const iconic = require('iconic');
pack.add('view', 'computer-workers.computer-worker-on-back-view');
pack.addMap(data, parentName);
pack.remove(name);
pack.writeIcons(dirname);
pack.writePngIcons(dirname, size);
pack
.writeJpegIcons(dirname, size, bg)
.then(() => {});
var code = pack.compileSprite();
pack
.writeSprite(filename, minify)
.then(() => {});
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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