Comparing version 0.2.2 to 1.0.0
@@ -5,2 +5,20 @@ # Change Log | ||
<a name="1.0.0"></a> | ||
# [1.0.0](https://github.com/pixelass/abcq/compare/v0.2.0...v1.0.0) (2018-09-24) | ||
### Bug Fixes | ||
* **main:** index.js export ([396dcf7](https://github.com/pixelass/abcq/commit/396dcf7)) | ||
* feat(typings) Refactor to typescript ([170b92e](https://github.com/pixelass/abcq/commit/170b92e)) | ||
### BREAKING CHANGES | ||
* removes dist | ||
<a name="0.2.2"></a> | ||
@@ -7,0 +25,0 @@ ## [0.2.2](https://github.com/pixelass/abcq/compare/v0.2.1...v0.2.2) (2016-09-22) |
{ | ||
"name": "abcq", | ||
"version": "0.2.2", | ||
"version": "1.0.0", | ||
"description": "", | ||
"repository": "git@github.com:pixelass/abcq.git", | ||
"main": "index.js", | ||
"main": "lib/src/index.js", | ||
"scripts": { | ||
"babel": "babel src --out-dir lib", | ||
"prebuild": "NODE_ENV=production; npm run create-index", | ||
"build": "npm run babel; node build", | ||
"coveralls": "cat ./coverage/lcov.info | coveralls", | ||
"create-index": "echo '/* global exports */\nmodule.exports = require(\"./lib\").default;' > index.js", | ||
"docs": "rm -rf docs && mkdir docs && jsdoc -c jsdoc.json", | ||
"lint": "eslint src build.js", | ||
"precommit": "npm test", | ||
"prepublish": "npm run create-index; npm run build", | ||
"prepush": "npm test", | ||
"prerelease": "npm test", | ||
"pretest": "NODE_ENV=test;npm run build; npm run lint", | ||
"build": "yarn clean:lib && tsc", | ||
"clean:lib": "rimraf lib", | ||
"format": "yarn run format:md; yarn run format:ts; yarn run format:js; yarn run format:json", | ||
"format:json": "prettier *.json --parser json --write", | ||
"format:js": "prettier 'tests/**/*.js' --parser typescript --write", | ||
"format:ts": "prettier 'src/**/*.ts' --parser typescript --write", | ||
"format:md": "prettier *.md --parser markdown --write", | ||
"lint": " yarn run lint:ts", | ||
"lint:ts": "tslint-config-prettier-check ./tslint.json", | ||
"precommit": "yarn test", | ||
"prepublish": "yarn build", | ||
"prepush": "yarn test", | ||
"prerelease": "yarn test", | ||
"pretest": "yarn build", | ||
"posttest": "yarn lint", | ||
"release": "standard-version --no-verify", | ||
"test": "babel-node ./node_modules/istanbul/lib/cli.js cover _mocha -- ./src/spec" | ||
"test": "ava", | ||
"watch": "yarn clean:lib && tsc --watch" | ||
}, | ||
@@ -27,45 +31,15 @@ "keywords": [], | ||
"devDependencies": { | ||
"babel-cli": "^6.14.0", | ||
"babel-plugin-istanbul": "^2.0.1", | ||
"babel-preset-es2015": "^6.14.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"babelify": "^7.3.0", | ||
"browserify": "^13.1.0", | ||
"chai": "^3.5.0", | ||
"coveralls": "^2.11.14", | ||
"cz-conventional-changelog": "^1.2.0", | ||
"errorify": "^0.3.1", | ||
"eslint": "^3.5.0", | ||
"eslint-config-standard": "^6.0.1", | ||
"eslint-plugin-promise": "^2.0.1", | ||
"eslint-plugin-standard": "^2.0.0", | ||
"hopsdoc": "^0.1.7", | ||
"husky": "^0.11.8", | ||
"istanbul": "git://github.com/pixelass/istanbul.git#v1", | ||
"jsdoc": "^3.4.1", | ||
"log": "^1.4.0", | ||
"mocha": "^3.0.2", | ||
"standard-version": "^2.4.0", | ||
"uglifyify": "^3.0.3", | ||
"watchify": "^3.7.0" | ||
"ava": "^0.25.0", | ||
"husky": "^1.0.0-rc.15", | ||
"prettier": "^1.14.3", | ||
"rimraf": "^2.6.2", | ||
"standard-version": "^4.4.0", | ||
"tslint": "^5.11.0", | ||
"tslint-config-prettier": "^1.15.0", | ||
"tslint-eslint-rules": "^5.4.0", | ||
"typescript": "^3.0.3" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"babelify", | ||
[ | ||
"babelify", | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"stage-0" | ||
] | ||
} | ||
] | ||
] | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
"dependencies": { | ||
"tslib": "^1.9.3" | ||
} | ||
} |
@@ -9,3 +9,3 @@ # abcq | ||
[![Coveralls branch](https://img.shields.io/coveralls/pixelass/abcq.svg)](https://coveralls.io/github/pixelass/abcq) | ||
[![Bithound Code](https://img.shields.io/bithound/code/github/pixelass/abcq.svg](https://www.bithound.io/github/pixelass/abcq) | ||
[![bitHound Overall Score](https://www.bithound.io/github/pixelass/abcq/badges/score.svg)](https://www.bithound.io/github/pixelass/abcq) | ||
[![Standard Version](https://img.shields.io/badge/release-standard%20version-brightgreen.svg)](https://github.com/conventional-changelog/standard-version) | ||
@@ -20,10 +20,9 @@ [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) | ||
[![GitHub forks](https://img.shields.io/github/forks/pixelass/abcq.svg)](https://github.com/pixelass/abcq/network) | ||
[![GitHub stars](https://img.shields.io/github/stars/pixelass/abcq.svg)](https://github.com/pixelass/abcq/stargazers) | ||
[![GitHub stars](https://img.shields.io/github/stars/pixelass/abcq.svg)](https://github.com/pixelass/abcq/stargazers) | ||
- Convert numbers to character combinations. | ||
- Count by character combination | ||
- Create unique ids | ||
- Create simple hashes | ||
* Convert numbers to character combinations. | ||
* Count by character combination | ||
* Create unique ids | ||
* Create simple hashes | ||
```shell | ||
@@ -36,11 +35,11 @@ npm i abcq | ||
```js | ||
const shortid = new abcQ() | ||
const shortid = new abcQ(); | ||
shortid.generate() | ||
shortid.generate(); | ||
// -> a | ||
shortid.generate() | ||
shortid.generate(); | ||
// -> b | ||
shortid.encode(1234567890) | ||
shortid.encode(1234567890); | ||
// -> clRjXk | ||
shortid.decode('clRjXk') | ||
shortid.decode("clRjXk"); | ||
// -> 1234567890 | ||
@@ -56,9 +55,9 @@ ``` | ||
const unicornLove = new abcQ({ | ||
chars: ['🦄','💖'], | ||
counter: 42 | ||
}) | ||
chars: ["🦄", "💖"], | ||
counter: 42 | ||
}); | ||
unicornLove.generate() | ||
unicornLove.generate(); | ||
// -> 🦄💖💖🦄💖 | ||
unicornLove.encode(8) | ||
unicornLove.encode(8); | ||
// -> 🦄💖🦄 | ||
@@ -70,25 +69,25 @@ ``` | ||
```js | ||
const browserify = require('browserify') | ||
const cssModulesify = require('css-modulesify') | ||
const abcQ = require('abcq') | ||
const browserify = require("browserify"); | ||
const cssModulesify = require("css-modulesify"); | ||
const abcQ = require("abcq"); | ||
function generator() { | ||
const shortid = new abcQ() | ||
this.names = {} | ||
return (name, file) => { | ||
const obj = this.names[file] || {} | ||
if (!(name in obj)) { | ||
obj[name] = shortid.generate() | ||
} | ||
this.names[file] = obj | ||
return obj[name] | ||
} | ||
const shortid = new abcQ(); | ||
this.names = {}; | ||
return (name, file) => { | ||
const obj = this.names[file] || {}; | ||
if (!(name in obj)) { | ||
obj[name] = shortid.generate(); | ||
} | ||
this.names[file] = obj; | ||
return obj[name]; | ||
}; | ||
} | ||
const entries = 'index.js' | ||
const output = 'style.css' | ||
const generateScopedName = new generator() | ||
const entries = "index.js"; | ||
const output = "style.css"; | ||
const generateScopedName = new generator(); | ||
const b = browserify({entries}) | ||
b.plugin(cssModulesify, {output, generateScopedName}) | ||
const b = browserify({entries}); | ||
b.plugin(cssModulesify, {output, generateScopedName}); | ||
``` | ||
@@ -99,9 +98,11 @@ | ||
### `chars` | ||
* type: { Array | String } | ||
* default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | ||
- type: { Array | String } | ||
- default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | ||
### `counter` | ||
* type: { Number } | ||
* default: -1 | ||
- type: { Number } | ||
- default: -1 | ||
## Methods | ||
@@ -112,6 +113,6 @@ | ||
```js | ||
const abc = new abcQ() | ||
abc.generate() | ||
const abc = new abcQ(); | ||
abc.generate(); | ||
// -> a | ||
abc.generate() | ||
abc.generate(); | ||
// -> b | ||
@@ -123,4 +124,4 @@ ``` | ||
```js | ||
const abc = new abcQ() | ||
abc.encode(1234567890) | ||
const abc = new abcQ(); | ||
abc.encode(1234567890); | ||
// -> clRjXk | ||
@@ -132,5 +133,5 @@ ``` | ||
```js | ||
const abc = new abcQ() | ||
abc.decode('clRjXk') | ||
const abc = new abcQ(); | ||
abc.decode("clRjXk"); | ||
// -> 1234567890 | ||
``` |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
186460
9
21
1
129
1
1
400
1
+ Addedtslib@^1.9.3
+ Addedtslib@1.14.1(transitive)