Skip to content
This repository was archived by the owner on Mar 28, 2018. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ef55860

Browse files
committedJul 25, 2017
Hello, world
0 parents  commit ef55860

File tree

9 files changed

+4405
-0
lines changed

9 files changed

+4405
-0
lines changed
 

‎.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules/

‎.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- '8'
4+
- '6'

‎index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict'
2+
3+
module.exports = function hasGradient (options) {
4+
options = options || {}
5+
6+
return true
7+
}

‎license

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 John Otander
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

‎package-lock.json

Lines changed: 4280 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "has-gradient",
3+
"description": "Determine whether a property contains a gradient",
4+
"author": "John Otander",
5+
"version": "0.1.0",
6+
"main": "index.js",
7+
"files": [
8+
"index.js"
9+
],
10+
"scripts": {
11+
"test": "ava"
12+
},
13+
"repository": "cssstats/has-gradient",
14+
"keywords": [],
15+
"license": "MIT",
16+
"dependencies": {},
17+
"devDependencies": {
18+
"ava": "*"
19+
}
20+
}

‎readme.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# has-gradient [![Build Status](https://secure.travis-ci.org/cssstats/has-gradient.svg?branch=master)](https://travis-ci.org/cssstats/has-gradient) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
2+
3+
Determine whether a property contains a gradient
4+
5+
## Installation
6+
7+
```bash
8+
npm install --save has-gradient
9+
```
10+
11+
## Usage
12+
13+
```javascript
14+
var hasGradient = require('has-gradient')
15+
16+
hasGradient() // => true
17+
```
18+
19+
## License
20+
21+
MIT
22+
23+
## Contributing
24+
25+
1. Fork it
26+
2. Create your feature branch (`git checkout -b my-new-feature`)
27+
3. Commit your changes (`git commit -am 'Add some feature'`)
28+
4. Push to the branch (`git push origin my-new-feature`)
29+
5. Create new Pull Request
30+
31+
Crafted with <3 by John Otander ([@cssstats](https://twitter.com/cssstats)).
32+
33+
***
34+
35+
> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).

‎test.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import test from 'ava'
2+
import hasGradient from './'
3+
4+
const WITH_GRADIENTS = [
5+
'linear-gradient(white, tomato)',
6+
'radial-gradient(hotpink, rebeccapurple)',
7+
'linear-gradient(blue, rgba(0, 0, 0, .4)'
8+
]
9+
10+
const WITHOUT_GRADIENTS = [
11+
'red',
12+
'url(/my/img.png)'
13+
]
14+
15+
test('returns true with a gradient', t => {
16+
t.plan(WITH_GRADIENTS.length)
17+
18+
WITH_GRADIENTS.forEach(gradient => t.true(hasGradient(gradient)))
19+
})
20+
21+
test('returns false without a gradient', t => {
22+
t.plan(WITHOUT_GRADIENTS.length)
23+
24+
WITHOUT_GRADIENTS.forEach(gradient => t.false(hasGradient(gradient)))
25+
})

0 commit comments

Comments
 (0)
This repository has been archived.