Socket
Socket
Sign inDemoInstall

srcset

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

srcset - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

22

package.json
{
"name": "srcset",
"version": "0.1.0",
"version": "0.1.1",
"description": "Parse and stringify the HTML <img> srcset attribute",

@@ -14,4 +14,2 @@ "keywords": [

],
"homepage": "https://github.com/sindresorhus/srcset",
"bugs": "https://github.com/sindresorhus/srcset/issues",
"author": {

@@ -23,14 +21,8 @@ "name": "Sindre Sorhus",

"main": "srcset",
"repository": {
"type": "git",
"url": "git://github.com/sindresorhus/srcset.git"
},
"repository": "sindresorhus/srcset",
"scripts": {
"test": "mocha && phantomjs node_modules/mocha-phantomjs/lib/mocha-phantomjs.coffee test/test.html"
"test": "mocha"
},
"devDependencies": {
"mocha": "~1.12.0",
"chai": "~1.7.2",
"phantomjs": "~1.9.0",
"mocha-phantomjs": "~3.1.1"
"mocha": "*"
},

@@ -40,7 +32,3 @@ "engines": {

},
"licenses": [
{
"type": "MIT"
}
],
"license": "MIT",
"files": [

@@ -47,0 +35,0 @@ "srcset.js"

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

# srcset [![Build Status](https://secure.travis-ci.org/sindresorhus/srcset.png?branch=master)](http://travis-ci.org/sindresorhus/srcset)
# srcset [![Build Status](https://travis-ci.org/sindresorhus/srcset.svg?branch=master)](https://travis-ci.org/sindresorhus/srcset)

@@ -12,22 +12,16 @@ > Parse and stringify the HTML `<img>` [srcset](http://mobile.smashingmagazine.com/2013/08/21/webkit-implements-srcset-and-why-its-a-good-thing/) attribute.

#### [npm](https://npmjs.org/package/srcset)
```bash
$ npm install --save srcset
```
npm install --save srcset
```
#### [Bower](http://bower.io)
```bash
$ bower install --save srcset
```
bower install --save srcset
```
#### [Component](https://github.com/component/component)
```bash
$ component install sindresorhus/srcset
```
component install sindresorhus/srcset
```
## Example
## Usage

@@ -64,9 +58,9 @@ How an image with `srcset` might look like:

## Documentation
## API
### parse()
### srcset.parse()
Accepts a srcset string and returns an array of objects with the possible properties: `url` (always), `width`, `height`, `density`.
### stringify()
### srcset.stringify()

@@ -78,2 +72,2 @@ Accepts an array of objects with the possible properties: `url` (required), `width`, `height`, `density` and returns a srcset string.

MIT © [Sindre Sorhus](http://sindresorhus.com)
[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://sindresorhus.com)
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