Comparing version 2.0.1 to 3.0.0
/** | ||
* @file **unraw - errors.ts** | Error messages used by `unraw`. | ||
* @author Ian Sanders | ||
* @copyright 2019 Ian Sanders | ||
* @license MIT | ||
*/ | ||
/** | ||
* Keys for possible error messages used by `unraw`. | ||
@@ -44,2 +38,1 @@ * Note: These do _not_ map to actual error object types. All errors thrown | ||
export declare const errorMessages: Readonly<Map<ErrorType, string>>; | ||
//# sourceMappingURL=errors.d.ts.map |
"use strict"; | ||
/** | ||
* @file **unraw - errors.ts** | Error messages used by `unraw`. | ||
* @author Ian Sanders | ||
* @copyright 2019 Ian Sanders | ||
* @license MIT | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// NOTE: don't construct errors here or they'll have the wrong stack trace. | ||
// NOTE: don't make custom error class; the JS engines use `SyntaxError` | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.errorMessages = exports.ErrorType = void 0; | ||
/** | ||
@@ -66,2 +61,1 @@ * Keys for possible error messages used by `unraw`. | ||
]); | ||
//# sourceMappingURL=errors.js.map |
@@ -1,8 +0,1 @@ | ||
/** | ||
* @file **unraw** | Convert raw escape sequences to their respective characters | ||
* (undo `String.raw`). | ||
* @author Ian Sanders | ||
* @copyright 2019 Ian Sanders | ||
* @license MIT | ||
*/ | ||
import { ErrorType, errorMessages } from "./errors"; | ||
@@ -21,2 +14,1 @@ export { ErrorType, errorMessages }; | ||
export default unraw; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
/** | ||
* @file **unraw** | Convert raw escape sequences to their respective characters | ||
* (undo `String.raw`). | ||
* @author Ian Sanders | ||
* @copyright 2019 Ian Sanders | ||
* @license MIT | ||
*/ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.unraw = exports.errorMessages = exports.ErrorType = void 0; | ||
const errors_1 = require("./errors"); | ||
exports.ErrorType = errors_1.ErrorType; | ||
exports.errorMessages = errors_1.errorMessages; | ||
Object.defineProperty(exports, "ErrorType", { enumerable: true, get: function () { return errors_1.ErrorType; } }); | ||
Object.defineProperty(exports, "errorMessages", { enumerable: true, get: function () { return errors_1.errorMessages; } }); | ||
/** | ||
@@ -196,2 +190,1 @@ * Parse a string as a base-16 number. This is more strict than `parseInt` as it | ||
exports.default = unraw; | ||
//# sourceMappingURL=index.js.map |
@@ -0,0 +0,0 @@ MIT License |
{ | ||
"name": "unraw", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "Convert raw escape sequences to their respective characters (undo String.raw).", | ||
"main": "dist/index.js", | ||
"unpkg": "dist/index.min.js", | ||
"types": "dist/index.d.ts", | ||
@@ -11,11 +10,7 @@ "repository": "https://github.com/iansan5653/unraw", | ||
"build": "tsc", | ||
"minify": "node-minify --compressor uglify-es --input dist/index.js --output dist/index.min.js & node-minify --compressor uglify-es --input dist/errors.js --output dist/errors.min.js", | ||
"test": "ts-mocha src/**/*.test.ts", | ||
"testWithCoverage": "npm run build && nyc --reporter=text mocha src/**/*.test.ts --require ts-node/register --require source-map-support/register", | ||
"testForCheck": "nyc --reporter=text-summary mocha src/index.test.ts --reporter=progress", | ||
"testForCI": "nyc --reporter=cobertura --reporter=html mocha src/index.test.ts --reporter=mocha-junit-reporter --reporter-options mochaFile=test-results.xml", | ||
"lint": "eslint src/**/*.ts", | ||
"check": "npm run build && npm run testForCheck && npm run lint", | ||
"check": "npm run build && npm run test && npm run lint", | ||
"ensureCleanTree": "echo 'Checking to ensure all changes are committed...' && git diff --quiet --exit-code & git diff --quiet --cached --exit-code", | ||
"prepublishOnly": "npm run ensureCleanTree && npm run check && npm run minify", | ||
"prepublishOnly": "npm run ensureCleanTree && npm run check", | ||
"postpublish": "cross-var git tag -a $npm_package_version -m \"See changelog.md for release notes.\" && git push --tags && cross-var git tag -d $npm_package_version", | ||
@@ -30,5 +25,2 @@ "format": "prettier src/**/*.test.ts --write" | ||
"devDependencies": { | ||
"@node-minify/core": "^5.3.0", | ||
"@node-minify/cli": "^5.3.0", | ||
"@node-minify/uglify-es": "^5.3.0", | ||
"@types/mocha": "^7.0.2", | ||
@@ -45,5 +37,3 @@ "@types/node": "^13.9.5", | ||
"mocha-junit-reporter": "^1.23.3", | ||
"nyc": "^15.0.0", | ||
"prettier": "^2.0.2", | ||
"source-map-support": "^0.5.16", | ||
"ts-mocha": "^7.0.0", | ||
@@ -53,28 +43,7 @@ "typescript": "^3.8.3" | ||
"dependencies": {}, | ||
"nyc": { | ||
"include": [ | ||
"src/**/*.ts", | ||
"src/**/*.tsx" | ||
], | ||
"extension": [ | ||
".ts", | ||
".tsx" | ||
], | ||
"require": [ | ||
"ts-node/register" | ||
], | ||
"sourceMap": true, | ||
"instrument": true | ||
}, | ||
"files": [ | ||
"dist/index.d.ts", | ||
"dist/index.d.ts.map", | ||
"dist/index.js", | ||
"dist/index.js.map", | ||
"dist/index.min.js", | ||
"dist/errors.d.ts", | ||
"dist/errors.d.ts.map", | ||
"dist/errors.js", | ||
"dist/errors.js.map", | ||
"dist/errors.min.js" | ||
"dist/errors.js" | ||
], | ||
@@ -81,0 +50,0 @@ "keywords": [ |
# `unraw` | ||
[![Build Status](https://dev.azure.com/iansan5653/unraw/_apis/build/status/iansan5653.unraw?branchName=master)](https://dev.azure.com/iansan5653/unraw/_build/latest?definitionId=3&branchName=master) | ||
[![Azure DevOps tests](https://img.shields.io/azure-devops/tests/iansan5653/unraw/3?compact_message)](https://dev.azure.com/iansan5653/unraw/_build/latest?definitionId=3&branchName=master) | ||
[![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/iansan5653/unraw/3)](https://dev.azure.com/iansan5653/unraw/_build/latest?definitionId=3&branchName=master) | ||
[![npm](https://img.shields.io/npm/v/unraw)](https://www.npmjs.com/package/unraw) | ||
[![David](https://david-dm.org/iansan5653/unraw.svg)](https://david-dm.org/iansan5653/unraw) | ||
[![David](https://david-dm.org/iansan5653/unraw/dev-status.svg)](https://david-dm.org/iansan5653/unraw?type=dev) | ||
```ts | ||
@@ -12,0 +4,0 @@ unraw("\\'\\t\\u{1f601}\\'"); // -> "' š'" |
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
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
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
14
1
20429
7
299
169