Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
21
node_modules/text-hex/LICENSE
generated
vendored
Normal file
21
node_modules/text-hex/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2015 Arnout Kazemier <opensource@3rd-Eden.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
20
node_modules/text-hex/README.md
generated
vendored
Normal file
20
node_modules/text-hex/README.md
generated
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
# text-hex
|
||||
|
||||
Transforms a given piece of text to a hex color.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
npm install text-hex
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var hex = require('text-hex');
|
||||
console.log(hex('foo'));
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
24
node_modules/text-hex/index.js
generated
vendored
Normal file
24
node_modules/text-hex/index.js
generated
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
/***
|
||||
* Convert string to hex color.
|
||||
*
|
||||
* @param {String} str Text to hash and convert to hex.
|
||||
* @returns {String}
|
||||
* @api public
|
||||
*/
|
||||
module.exports = function hex(str) {
|
||||
for (
|
||||
var i = 0, hash = 0;
|
||||
i < str.length;
|
||||
hash = str.charCodeAt(i++) + ((hash << 5) - hash)
|
||||
);
|
||||
|
||||
var color = Math.floor(
|
||||
Math.abs(
|
||||
(Math.sin(hash) * 10000) % 1 * 16777216
|
||||
)
|
||||
).toString(16);
|
||||
|
||||
return '#' + Array(6 - color.length + 1).join('0') + color;
|
||||
};
|
30
node_modules/text-hex/package.json
generated
vendored
Normal file
30
node_modules/text-hex/package.json
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "text-hex",
|
||||
"version": "1.0.0",
|
||||
"description": "Generate a hex color from the given text",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec --ui bdd test.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/3rd-Eden/text-hex"
|
||||
},
|
||||
"keywords": [
|
||||
"css",
|
||||
"color",
|
||||
"hex",
|
||||
"text"
|
||||
],
|
||||
"author": "Arnout Kazemier",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/3rd-Eden/text-hex/issues"
|
||||
},
|
||||
"homepage": "https://github.com/3rd-Eden/text-hex",
|
||||
"devDependencies": {
|
||||
"assume": "2.1.x",
|
||||
"mocha": "5.2.x",
|
||||
"pre-commit": "1.2.x"
|
||||
}
|
||||
}
|
11
node_modules/text-hex/test.js
generated
vendored
Normal file
11
node_modules/text-hex/test.js
generated
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
describe('text-hex', function () {
|
||||
'use strict';
|
||||
|
||||
var assume = require('assume')
|
||||
, hex = require('./');
|
||||
|
||||
it('is a 6 digit hex', function () {
|
||||
assume(hex('a')).to.have.length(7); // including a #
|
||||
assume(hex('a244fdafadfa4 adfau8fa a u adf8a0')).to.have.length(7);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue