Comparing version 5.0.0-beta1 to 5.0.0
{ | ||
"name": "color-tf", | ||
"version": "5.0.0-beta1", | ||
"version": "5.0.0", | ||
"description": "RGB, HSL, HSV, HWB and more color models convertor", | ||
"main": "dist/cjs/proxy", | ||
"browser": "dist/umd.js", | ||
"module": "dist/es/proxy", | ||
"main": "proxy", | ||
"browser": "umd.js", | ||
"module": "src/proxy", | ||
"scripts": { | ||
"test": "babel-node --presets @babel/env test/index.spec", | ||
"prepare": "npx rollup -c" | ||
"rollup": "NODE_ENV=rollup npx rollup -c", | ||
"pack": "npx babel --out-dir dist --source-type module src && npm run rollup && cp package.json dist/ && cp README.md dist/ && cp -r src dist/", | ||
"pub": "npm run pack && npm publish dist" | ||
}, | ||
@@ -32,2 +34,3 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0-beta.46", | ||
"@babel/core": "^7.0.0-beta.46", | ||
@@ -34,0 +37,0 @@ "@babel/node": "^7.0.0-beta.46", |
@@ -14,9 +14,11 @@ ## Color transforms between RGB, HSL, HSV and HWB, and more | ||
The default export is a proxy, there are alse [direct functions](https://unpkg.com/color-tf@5.0.0-beta2/src/) available | ||
### Usage | ||
```js | ||
import { hslToRgb, hsvToHex } from 'color-tf'; | ||
import colorTf from 'color-tf'; | ||
import hsl2hsv from 'color-tf/hsl2hsv'; | ||
hslToRgb(200, 95, 62); // [ 66, 189, 250 ] | ||
hsvToHex(200, 95, 62); // '086c9e' | ||
colorTf.hslToRgb(200, 95, 62); // [ 66, 189, 250 ] | ||
``` |
@@ -1,2 +0,2 @@ | ||
import * as lib from './fns/index'; | ||
import * as lib from './fns'; | ||
@@ -52,3 +52,4 @@ import * as libHex from './hex'; | ||
get: (map, key) => { | ||
console.log('get', key); | ||
if (typeof key !== 'string') return map; | ||
if (map.has(key)) return map.get(key); | ||
@@ -67,6 +68,5 @@ | ||
fn = funcs.reduceRight((func, f) => (...a) => f(...func(...a))); | ||
console.log('get path', fromKey, toKey, path, fn); | ||
map.set(k, fn); | ||
} | ||
if (k[3] === '2') return fn; | ||
if (key[3] === '2') return fn; | ||
@@ -73,0 +73,0 @@ const K = fromKey + 'To' + toKey[0].toUpperCase() + toKey.slice(1); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
46778
55
1289
0
24
6
1