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

@cloudfour/simple-svg-placeholder

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudfour/simple-svg-placeholder - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

.github/workflows/ci.yml

10

examples/index.js

@@ -14,3 +14,3 @@ const fs = require('fs');

textColor: '#7FDBFF',
...settings
...settings,
}),

@@ -20,7 +20,7 @@ font: simpleSvgPlaceholder({

fontWeight: 'normal',
...settings
})
...settings,
}),
};
Object.keys(examples).forEach(name => {
for (const name of Object.keys(examples)) {
fs.writeFileSync(

@@ -31,2 +31,2 @@ path.join(__dirname, `./${name}.svg`),

);
});
}
{
"name": "@cloudfour/simple-svg-placeholder",
"version": "1.0.2",
"version": "1.1.0",
"description": "A very simple placeholder image generator with zero dependencies. Returns a data URI (or raw SVG source) as a string for use in templates.",

@@ -14,10 +14,22 @@ "keywords": [

],
"main": "index.js",
"main": "cjs/index.js",
"module": "mjs/index.js",
"exports": {
".": {
"import": "./mjs/index.js",
"require": "./cjs/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"check-lint": "prettier --list-different '**/*.js' && eslint '**/*.js'",
"check-lint": "prettier --check '**/*.js' && eslint '**/*.js'",
"lint": "prettier --write '**/*.js' && eslint --fix '**/*.js'",
"prepare": "ascjs mjs cjs --no-default",
"examples": "node examples"
},
"eslintConfig": {
"extends": "plugin:@cloudfour/recommended"
"extends": "plugin:@cloudfour/recommended",
"rules": {
"@cloudfour/unicorn/text-encoding-identifier-case": "off"
}
},

@@ -38,6 +50,8 @@ "prettier": {

"devDependencies": {
"@cloudfour/eslint-plugin": "^5.0.0",
"eslint": "^6.8.0",
"prettier": "^1.19.1"
"@cloudfour/eslint-plugin": "21.1.0",
"ascjs": "5.0.1",
"eslint": "8.23.1",
"prettier": "2.7.1",
"typescript": "4.8.3"
}
}
# Simple SVG Placeholder
[![NPM version](https://img.shields.io/npm/v/@cloudfour/simple-svg-placeholder.svg)](https://www.npmjs.com/package/@cloudfour/simple-svg-placeholder) [![Build Status](https://github.com/cloudfour/simple-svg-placeholder/workflows/CI/badge.svg)](https://github.com/cloudfour/simple-svg-placeholder/actions?query=workflow%3ACI) [![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
> A very simple placeholder image generator with zero dependencies. Returns a data URI (or raw SVG source) as a string for use in templates.

@@ -13,7 +15,15 @@

Once installed, you may import and call the function to generate placeholder SVGs:
Once installed, you may import the function as an ES or CommonJS module:
```javascript
// Module
import simpleSvgPlaceholder from 'simple-svg-placeholder';
// CommonJS
const simpleSvgPlaceholder = require('@cloudfour/simple-svg-placeholder');
```
Then call the function to generate placeholder SVGs:
```javascript
const placeholder = simpleSvgPlaceholder(/* options */);

@@ -30,3 +40,3 @@ // => 'data:image/svg+xml;...'

```javascript
simpleSvgPlaceholder()
simpleSvgPlaceholder();
```

@@ -41,4 +51,4 @@

width: 180,
height: 135
})
height: 135,
});
```

@@ -52,4 +62,4 @@

simpleSvgPlaceholder({
text: 'Hello world!'
})
text: 'Hello world!',
});
```

@@ -64,4 +74,4 @@

bgColor: '#0F1C3F',
textColor: '#7FDBFF'
})
textColor: '#7FDBFF',
});
```

@@ -76,4 +86,4 @@

fontFamily: 'Georgia, serif',
fontWeight: 'normal'
})
fontWeight: 'normal',
});
```

@@ -80,0 +90,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