projen-cdktf-hybrid-construct 0.1.54 → 0.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +0 -1
- package/.jsii +574 -0
- package/.projenrc.ts +17 -5
- package/API.md +7347 -0
- package/CHANGELOG.md +5 -7
- package/README.md +45 -21
- package/lib/defaults.d.ts +0 -1
- package/lib/defaults.js +1 -1
- package/lib/hybrid-module.d.ts +48 -20
- package/lib/hybrid-module.js +28 -20
- package/lib/index.js +3 -7
- package/lib/publishing.d.ts +5 -0
- package/lib/publishing.js +25 -3
- package/lib/terraform-module.d.ts +35 -16
- package/lib/terraform-module.js +19 -10
- package/node_modules/camel-case/LICENSE +21 -0
- package/node_modules/camel-case/README.md +47 -0
- package/node_modules/camel-case/dist/index.d.ts +5 -0
- package/node_modules/camel-case/dist/index.js +23 -0
- package/node_modules/camel-case/dist/index.js.map +1 -0
- package/node_modules/camel-case/dist/index.spec.d.ts +1 -0
- package/node_modules/camel-case/dist/index.spec.js +26 -0
- package/node_modules/camel-case/dist/index.spec.js.map +1 -0
- package/node_modules/camel-case/dist.es2015/index.d.ts +5 -0
- package/node_modules/camel-case/dist.es2015/index.js +17 -0
- package/node_modules/camel-case/dist.es2015/index.js.map +1 -0
- package/node_modules/camel-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/camel-case/dist.es2015/index.spec.js +24 -0
- package/node_modules/camel-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/camel-case/package.json +89 -0
- package/node_modules/capital-case/LICENSE +21 -0
- package/node_modules/capital-case/README.md +37 -0
- package/node_modules/capital-case/dist/index.d.ts +4 -0
- package/node_modules/capital-case/dist/index.js +16 -0
- package/node_modules/capital-case/dist/index.js.map +1 -0
- package/node_modules/capital-case/dist/index.spec.d.ts +1 -0
- package/node_modules/capital-case/dist/index.spec.js +24 -0
- package/node_modules/capital-case/dist/index.spec.js.map +1 -0
- package/node_modules/capital-case/dist.es2015/index.d.ts +4 -0
- package/node_modules/capital-case/dist.es2015/index.js +11 -0
- package/node_modules/capital-case/dist.es2015/index.js.map +1 -0
- package/node_modules/capital-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/capital-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/capital-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/capital-case/package.json +90 -0
- package/node_modules/change-case/LICENSE +21 -0
- package/node_modules/change-case/README.md +44 -0
- package/node_modules/change-case/dist/index.d.ts +11 -0
- package/node_modules/change-case/dist/index.js +15 -0
- package/node_modules/change-case/dist/index.js.map +1 -0
- package/node_modules/change-case/dist/index.spec.d.ts +1 -0
- package/node_modules/change-case/dist/index.spec.js +9 -0
- package/node_modules/change-case/dist/index.spec.js.map +1 -0
- package/node_modules/change-case/dist.es2015/index.d.ts +11 -0
- package/node_modules/change-case/dist.es2015/index.js +12 -0
- package/node_modules/change-case/dist.es2015/index.js.map +1 -0
- package/node_modules/change-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/change-case/dist.es2015/index.spec.js +7 -0
- package/node_modules/change-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/change-case/package.json +101 -0
- package/node_modules/constant-case/LICENSE +21 -0
- package/node_modules/constant-case/README.md +37 -0
- package/node_modules/constant-case/dist/index.d.ts +3 -0
- package/node_modules/constant-case/dist/index.js +12 -0
- package/node_modules/constant-case/dist/index.js.map +1 -0
- package/node_modules/constant-case/dist/index.spec.d.ts +1 -0
- package/node_modules/constant-case/dist/index.spec.js +26 -0
- package/node_modules/constant-case/dist/index.spec.js.map +1 -0
- package/node_modules/constant-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/constant-case/dist.es2015/index.js +8 -0
- package/node_modules/constant-case/dist.es2015/index.js.map +1 -0
- package/node_modules/constant-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/constant-case/dist.es2015/index.spec.js +24 -0
- package/node_modules/constant-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/constant-case/package.json +90 -0
- package/node_modules/dot-case/LICENSE +21 -0
- package/node_modules/dot-case/README.md +37 -0
- package/node_modules/dot-case/dist/index.d.ts +3 -0
- package/node_modules/dot-case/dist/index.js +11 -0
- package/node_modules/dot-case/dist/index.js.map +1 -0
- package/node_modules/dot-case/dist/index.spec.d.ts +1 -0
- package/node_modules/dot-case/dist/index.spec.js +26 -0
- package/node_modules/dot-case/dist/index.spec.js.map +1 -0
- package/node_modules/dot-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/dot-case/dist.es2015/index.js +7 -0
- package/node_modules/dot-case/dist.es2015/index.js.map +1 -0
- package/node_modules/dot-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/dot-case/dist.es2015/index.spec.js +24 -0
- package/node_modules/dot-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/dot-case/package.json +89 -0
- package/node_modules/header-case/LICENSE +21 -0
- package/node_modules/header-case/README.md +37 -0
- package/node_modules/header-case/dist/index.d.ts +3 -0
- package/node_modules/header-case/dist/index.js +11 -0
- package/node_modules/header-case/dist/index.js.map +1 -0
- package/node_modules/header-case/dist/index.spec.d.ts +1 -0
- package/node_modules/header-case/dist/index.spec.js +24 -0
- package/node_modules/header-case/dist/index.spec.js.map +1 -0
- package/node_modules/header-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/header-case/dist.es2015/index.js +7 -0
- package/node_modules/header-case/dist.es2015/index.js.map +1 -0
- package/node_modules/header-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/header-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/header-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/header-case/package.json +89 -0
- package/node_modules/lower-case/LICENSE +21 -0
- package/node_modules/lower-case/README.md +35 -0
- package/node_modules/lower-case/dist/index.d.ts +8 -0
- package/node_modules/lower-case/dist/index.js +53 -0
- package/node_modules/lower-case/dist/index.js.map +1 -0
- package/node_modules/lower-case/dist/index.spec.d.ts +1 -0
- package/node_modules/lower-case/dist/index.spec.js +36 -0
- package/node_modules/lower-case/dist/index.spec.js.map +1 -0
- package/node_modules/lower-case/dist.es2015/index.d.ts +8 -0
- package/node_modules/lower-case/dist.es2015/index.js +48 -0
- package/node_modules/lower-case/dist.es2015/index.js.map +1 -0
- package/node_modules/lower-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/lower-case/dist.es2015/index.spec.js +34 -0
- package/node_modules/lower-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/lower-case/package.json +87 -0
- package/node_modules/no-case/LICENSE +21 -0
- package/node_modules/no-case/README.md +37 -0
- package/node_modules/no-case/dist/index.d.ts +10 -0
- package/node_modules/no-case/dist/index.js +35 -0
- package/node_modules/no-case/dist/index.js.map +1 -0
- package/node_modules/no-case/dist/index.spec.d.ts +1 -0
- package/node_modules/no-case/dist/index.spec.js +59 -0
- package/node_modules/no-case/dist/index.spec.js.map +1 -0
- package/node_modules/no-case/dist.es2015/index.d.ts +10 -0
- package/node_modules/no-case/dist.es2015/index.js +31 -0
- package/node_modules/no-case/dist.es2015/index.js.map +1 -0
- package/node_modules/no-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/no-case/dist.es2015/index.spec.js +57 -0
- package/node_modules/no-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/no-case/package.json +85 -0
- package/node_modules/param-case/LICENSE +21 -0
- package/node_modules/param-case/README.md +37 -0
- package/node_modules/param-case/dist/index.d.ts +3 -0
- package/node_modules/param-case/dist/index.js +11 -0
- package/node_modules/param-case/dist/index.js.map +1 -0
- package/node_modules/param-case/dist/index.spec.d.ts +1 -0
- package/node_modules/param-case/dist/index.spec.js +24 -0
- package/node_modules/param-case/dist/index.spec.js.map +1 -0
- package/node_modules/param-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/param-case/dist.es2015/index.js +7 -0
- package/node_modules/param-case/dist.es2015/index.js.map +1 -0
- package/node_modules/param-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/param-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/param-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/param-case/package.json +91 -0
- package/node_modules/pascal-case/LICENSE +21 -0
- package/node_modules/pascal-case/README.md +47 -0
- package/node_modules/pascal-case/dist/index.d.ts +5 -0
- package/node_modules/pascal-case/dist/index.js +24 -0
- package/node_modules/pascal-case/dist/index.js.map +1 -0
- package/node_modules/pascal-case/dist/index.spec.d.ts +1 -0
- package/node_modules/pascal-case/dist/index.spec.js +25 -0
- package/node_modules/pascal-case/dist/index.spec.js.map +1 -0
- package/node_modules/pascal-case/dist.es2015/index.d.ts +5 -0
- package/node_modules/pascal-case/dist.es2015/index.js +18 -0
- package/node_modules/pascal-case/dist.es2015/index.js.map +1 -0
- package/node_modules/pascal-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/pascal-case/dist.es2015/index.spec.js +23 -0
- package/node_modules/pascal-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/pascal-case/package.json +90 -0
- package/node_modules/path-case/LICENSE +21 -0
- package/node_modules/path-case/README.md +37 -0
- package/node_modules/path-case/dist/index.d.ts +3 -0
- package/node_modules/path-case/dist/index.js +11 -0
- package/node_modules/path-case/dist/index.js.map +1 -0
- package/node_modules/path-case/dist/index.spec.d.ts +1 -0
- package/node_modules/path-case/dist/index.spec.js +24 -0
- package/node_modules/path-case/dist/index.spec.js.map +1 -0
- package/node_modules/path-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/path-case/dist.es2015/index.js +7 -0
- package/node_modules/path-case/dist.es2015/index.js.map +1 -0
- package/node_modules/path-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/path-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/path-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/path-case/package.json +88 -0
- package/node_modules/sentence-case/LICENSE +21 -0
- package/node_modules/sentence-case/README.md +37 -0
- package/node_modules/sentence-case/dist/index.d.ts +4 -0
- package/node_modules/sentence-case/dist/index.js +19 -0
- package/node_modules/sentence-case/dist/index.js.map +1 -0
- package/node_modules/sentence-case/dist/index.spec.d.ts +1 -0
- package/node_modules/sentence-case/dist/index.spec.js +24 -0
- package/node_modules/sentence-case/dist/index.spec.js.map +1 -0
- package/node_modules/sentence-case/dist.es2015/index.d.ts +4 -0
- package/node_modules/sentence-case/dist.es2015/index.js +14 -0
- package/node_modules/sentence-case/dist.es2015/index.js.map +1 -0
- package/node_modules/sentence-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/sentence-case/dist.es2015/index.spec.js +22 -0
- package/node_modules/sentence-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/sentence-case/package.json +89 -0
- package/node_modules/snake-case/LICENSE +21 -0
- package/node_modules/snake-case/README.md +37 -0
- package/node_modules/snake-case/dist/index.d.ts +3 -0
- package/node_modules/snake-case/dist/index.js +11 -0
- package/node_modules/snake-case/dist/index.js.map +1 -0
- package/node_modules/snake-case/dist/index.spec.d.ts +1 -0
- package/node_modules/snake-case/dist/index.spec.js +25 -0
- package/node_modules/snake-case/dist/index.spec.js.map +1 -0
- package/node_modules/snake-case/dist.es2015/index.d.ts +3 -0
- package/node_modules/snake-case/dist.es2015/index.js +7 -0
- package/node_modules/snake-case/dist.es2015/index.js.map +1 -0
- package/node_modules/snake-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/snake-case/dist.es2015/index.spec.js +23 -0
- package/node_modules/snake-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/snake-case/package.json +90 -0
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/modules/index.js +55 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +38 -0
- package/node_modules/tslib/tslib.d.ts +398 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +248 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +317 -0
- package/node_modules/upper-case/README.md +34 -0
- package/node_modules/upper-case/dist/index.d.ts +8 -0
- package/node_modules/upper-case/dist/index.js +49 -0
- package/node_modules/upper-case/dist/index.js.map +1 -0
- package/node_modules/upper-case/dist/index.spec.d.ts +1 -0
- package/node_modules/upper-case/dist/index.spec.js +34 -0
- package/node_modules/upper-case/dist/index.spec.js.map +1 -0
- package/node_modules/upper-case/dist.es2015/index.d.ts +8 -0
- package/node_modules/upper-case/dist.es2015/index.js +44 -0
- package/node_modules/upper-case/dist.es2015/index.js.map +1 -0
- package/node_modules/upper-case/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/upper-case/dist.es2015/index.spec.js +32 -0
- package/node_modules/upper-case/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/upper-case/package.json +86 -0
- package/node_modules/upper-case-first/LICENSE +21 -0
- package/node_modules/upper-case-first/README.md +32 -0
- package/node_modules/upper-case-first/dist/index.d.ts +4 -0
- package/node_modules/upper-case-first/dist/index.js +11 -0
- package/node_modules/upper-case-first/dist/index.js.map +1 -0
- package/node_modules/upper-case-first/dist/index.spec.d.ts +1 -0
- package/node_modules/upper-case-first/dist/index.spec.js +20 -0
- package/node_modules/upper-case-first/dist/index.spec.js.map +1 -0
- package/node_modules/upper-case-first/dist.es2015/index.d.ts +4 -0
- package/node_modules/upper-case-first/dist.es2015/index.js +7 -0
- package/node_modules/upper-case-first/dist.es2015/index.js.map +1 -0
- package/node_modules/upper-case-first/dist.es2015/index.spec.d.ts +1 -0
- package/node_modules/upper-case-first/dist.es2015/index.spec.js +18 -0
- package/node_modules/upper-case-first/dist.es2015/index.spec.js.map +1 -0
- package/node_modules/upper-case-first/package.json +87 -0
- package/node_modules/uuid/CHANGELOG.md +229 -0
- package/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +505 -0
- package/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/uuid/dist/rng-browser.js +26 -0
- package/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/uuid/dist/stringify.js +39 -0
- package/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/uuid/dist/v35.js +78 -0
- package/node_modules/uuid/dist/v4.js +37 -0
- package/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/uuid/package.json +135 -0
- package/node_modules/uuid/wrapper.mjs +10 -0
- package/package.json +37 -6
- package/releasetag.txt +1 -0
- package/version.txt +1 -0
@@ -0,0 +1,317 @@
|
|
1
|
+
/******************************************************************************
|
2
|
+
Copyright (c) Microsoft Corporation.
|
3
|
+
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
5
|
+
purpose with or without fee is hereby granted.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
14
|
+
***************************************************************************** */
|
15
|
+
/* global global, define, System, Reflect, Promise */
|
16
|
+
var __extends;
|
17
|
+
var __assign;
|
18
|
+
var __rest;
|
19
|
+
var __decorate;
|
20
|
+
var __param;
|
21
|
+
var __metadata;
|
22
|
+
var __awaiter;
|
23
|
+
var __generator;
|
24
|
+
var __exportStar;
|
25
|
+
var __values;
|
26
|
+
var __read;
|
27
|
+
var __spread;
|
28
|
+
var __spreadArrays;
|
29
|
+
var __spreadArray;
|
30
|
+
var __await;
|
31
|
+
var __asyncGenerator;
|
32
|
+
var __asyncDelegator;
|
33
|
+
var __asyncValues;
|
34
|
+
var __makeTemplateObject;
|
35
|
+
var __importStar;
|
36
|
+
var __importDefault;
|
37
|
+
var __classPrivateFieldGet;
|
38
|
+
var __classPrivateFieldSet;
|
39
|
+
var __classPrivateFieldIn;
|
40
|
+
var __createBinding;
|
41
|
+
(function (factory) {
|
42
|
+
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
43
|
+
if (typeof define === "function" && define.amd) {
|
44
|
+
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
|
45
|
+
}
|
46
|
+
else if (typeof module === "object" && typeof module.exports === "object") {
|
47
|
+
factory(createExporter(root, createExporter(module.exports)));
|
48
|
+
}
|
49
|
+
else {
|
50
|
+
factory(createExporter(root));
|
51
|
+
}
|
52
|
+
function createExporter(exports, previous) {
|
53
|
+
if (exports !== root) {
|
54
|
+
if (typeof Object.create === "function") {
|
55
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
56
|
+
}
|
57
|
+
else {
|
58
|
+
exports.__esModule = true;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
|
62
|
+
}
|
63
|
+
})
|
64
|
+
(function (exporter) {
|
65
|
+
var extendStatics = Object.setPrototypeOf ||
|
66
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
67
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
68
|
+
|
69
|
+
__extends = function (d, b) {
|
70
|
+
if (typeof b !== "function" && b !== null)
|
71
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
72
|
+
extendStatics(d, b);
|
73
|
+
function __() { this.constructor = d; }
|
74
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
75
|
+
};
|
76
|
+
|
77
|
+
__assign = Object.assign || function (t) {
|
78
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
79
|
+
s = arguments[i];
|
80
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
81
|
+
}
|
82
|
+
return t;
|
83
|
+
};
|
84
|
+
|
85
|
+
__rest = function (s, e) {
|
86
|
+
var t = {};
|
87
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
88
|
+
t[p] = s[p];
|
89
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
90
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
91
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
92
|
+
t[p[i]] = s[p[i]];
|
93
|
+
}
|
94
|
+
return t;
|
95
|
+
};
|
96
|
+
|
97
|
+
__decorate = function (decorators, target, key, desc) {
|
98
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
99
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
100
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
101
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
102
|
+
};
|
103
|
+
|
104
|
+
__param = function (paramIndex, decorator) {
|
105
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
106
|
+
};
|
107
|
+
|
108
|
+
__metadata = function (metadataKey, metadataValue) {
|
109
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
110
|
+
};
|
111
|
+
|
112
|
+
__awaiter = function (thisArg, _arguments, P, generator) {
|
113
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
114
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
115
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
116
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
117
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
118
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
119
|
+
});
|
120
|
+
};
|
121
|
+
|
122
|
+
__generator = function (thisArg, body) {
|
123
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
124
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
125
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
126
|
+
function step(op) {
|
127
|
+
if (f) throw new TypeError("Generator is already executing.");
|
128
|
+
while (_) try {
|
129
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
130
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
131
|
+
switch (op[0]) {
|
132
|
+
case 0: case 1: t = op; break;
|
133
|
+
case 4: _.label++; return { value: op[1], done: false };
|
134
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
135
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
136
|
+
default:
|
137
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
138
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
139
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
140
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
141
|
+
if (t[2]) _.ops.pop();
|
142
|
+
_.trys.pop(); continue;
|
143
|
+
}
|
144
|
+
op = body.call(thisArg, _);
|
145
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
146
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
147
|
+
}
|
148
|
+
};
|
149
|
+
|
150
|
+
__exportStar = function(m, o) {
|
151
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
152
|
+
};
|
153
|
+
|
154
|
+
__createBinding = Object.create ? (function(o, m, k, k2) {
|
155
|
+
if (k2 === undefined) k2 = k;
|
156
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
157
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
158
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
159
|
+
}
|
160
|
+
Object.defineProperty(o, k2, desc);
|
161
|
+
}) : (function(o, m, k, k2) {
|
162
|
+
if (k2 === undefined) k2 = k;
|
163
|
+
o[k2] = m[k];
|
164
|
+
});
|
165
|
+
|
166
|
+
__values = function (o) {
|
167
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
168
|
+
if (m) return m.call(o);
|
169
|
+
if (o && typeof o.length === "number") return {
|
170
|
+
next: function () {
|
171
|
+
if (o && i >= o.length) o = void 0;
|
172
|
+
return { value: o && o[i++], done: !o };
|
173
|
+
}
|
174
|
+
};
|
175
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
176
|
+
};
|
177
|
+
|
178
|
+
__read = function (o, n) {
|
179
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
180
|
+
if (!m) return o;
|
181
|
+
var i = m.call(o), r, ar = [], e;
|
182
|
+
try {
|
183
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
184
|
+
}
|
185
|
+
catch (error) { e = { error: error }; }
|
186
|
+
finally {
|
187
|
+
try {
|
188
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
189
|
+
}
|
190
|
+
finally { if (e) throw e.error; }
|
191
|
+
}
|
192
|
+
return ar;
|
193
|
+
};
|
194
|
+
|
195
|
+
/** @deprecated */
|
196
|
+
__spread = function () {
|
197
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
198
|
+
ar = ar.concat(__read(arguments[i]));
|
199
|
+
return ar;
|
200
|
+
};
|
201
|
+
|
202
|
+
/** @deprecated */
|
203
|
+
__spreadArrays = function () {
|
204
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
205
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
206
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
207
|
+
r[k] = a[j];
|
208
|
+
return r;
|
209
|
+
};
|
210
|
+
|
211
|
+
__spreadArray = function (to, from, pack) {
|
212
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
213
|
+
if (ar || !(i in from)) {
|
214
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
215
|
+
ar[i] = from[i];
|
216
|
+
}
|
217
|
+
}
|
218
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
219
|
+
};
|
220
|
+
|
221
|
+
__await = function (v) {
|
222
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
223
|
+
};
|
224
|
+
|
225
|
+
__asyncGenerator = function (thisArg, _arguments, generator) {
|
226
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
227
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
228
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
229
|
+
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
230
|
+
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
231
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
232
|
+
function fulfill(value) { resume("next", value); }
|
233
|
+
function reject(value) { resume("throw", value); }
|
234
|
+
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
235
|
+
};
|
236
|
+
|
237
|
+
__asyncDelegator = function (o) {
|
238
|
+
var i, p;
|
239
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
240
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
241
|
+
};
|
242
|
+
|
243
|
+
__asyncValues = function (o) {
|
244
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
245
|
+
var m = o[Symbol.asyncIterator], i;
|
246
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
247
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
248
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
249
|
+
};
|
250
|
+
|
251
|
+
__makeTemplateObject = function (cooked, raw) {
|
252
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
253
|
+
return cooked;
|
254
|
+
};
|
255
|
+
|
256
|
+
var __setModuleDefault = Object.create ? (function(o, v) {
|
257
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
258
|
+
}) : function(o, v) {
|
259
|
+
o["default"] = v;
|
260
|
+
};
|
261
|
+
|
262
|
+
__importStar = function (mod) {
|
263
|
+
if (mod && mod.__esModule) return mod;
|
264
|
+
var result = {};
|
265
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
266
|
+
__setModuleDefault(result, mod);
|
267
|
+
return result;
|
268
|
+
};
|
269
|
+
|
270
|
+
__importDefault = function (mod) {
|
271
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
272
|
+
};
|
273
|
+
|
274
|
+
__classPrivateFieldGet = function (receiver, state, kind, f) {
|
275
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
276
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
277
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
278
|
+
};
|
279
|
+
|
280
|
+
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
|
281
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
282
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
283
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
284
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
285
|
+
};
|
286
|
+
|
287
|
+
__classPrivateFieldIn = function (state, receiver) {
|
288
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
289
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
290
|
+
};
|
291
|
+
|
292
|
+
exporter("__extends", __extends);
|
293
|
+
exporter("__assign", __assign);
|
294
|
+
exporter("__rest", __rest);
|
295
|
+
exporter("__decorate", __decorate);
|
296
|
+
exporter("__param", __param);
|
297
|
+
exporter("__metadata", __metadata);
|
298
|
+
exporter("__awaiter", __awaiter);
|
299
|
+
exporter("__generator", __generator);
|
300
|
+
exporter("__exportStar", __exportStar);
|
301
|
+
exporter("__createBinding", __createBinding);
|
302
|
+
exporter("__values", __values);
|
303
|
+
exporter("__read", __read);
|
304
|
+
exporter("__spread", __spread);
|
305
|
+
exporter("__spreadArrays", __spreadArrays);
|
306
|
+
exporter("__spreadArray", __spreadArray);
|
307
|
+
exporter("__await", __await);
|
308
|
+
exporter("__asyncGenerator", __asyncGenerator);
|
309
|
+
exporter("__asyncDelegator", __asyncDelegator);
|
310
|
+
exporter("__asyncValues", __asyncValues);
|
311
|
+
exporter("__makeTemplateObject", __makeTemplateObject);
|
312
|
+
exporter("__importStar", __importStar);
|
313
|
+
exporter("__importDefault", __importDefault);
|
314
|
+
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
315
|
+
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
316
|
+
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
|
317
|
+
});
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Upper Case
|
2
|
+
|
3
|
+
[![NPM version][npm-image]][npm-url]
|
4
|
+
[![NPM downloads][downloads-image]][downloads-url]
|
5
|
+
[![Bundle size][bundlephobia-image]][bundlephobia-url]
|
6
|
+
|
7
|
+
> Transforms the string to upper case.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
```
|
12
|
+
npm install upper-case --save
|
13
|
+
```
|
14
|
+
|
15
|
+
## Usage
|
16
|
+
|
17
|
+
```js
|
18
|
+
import { upperCase, localeUpperCase } from "upper-case";
|
19
|
+
|
20
|
+
upperCase("string"); //=> "STRING"
|
21
|
+
|
22
|
+
localeUpperCase("string", "tr"); //=> "STRİNG"
|
23
|
+
```
|
24
|
+
|
25
|
+
## License
|
26
|
+
|
27
|
+
MIT
|
28
|
+
|
29
|
+
[npm-image]: https://img.shields.io/npm/v/upper-case.svg?style=flat
|
30
|
+
[npm-url]: https://npmjs.org/package/upper-case
|
31
|
+
[downloads-image]: https://img.shields.io/npm/dm/upper-case.svg?style=flat
|
32
|
+
[downloads-url]: https://npmjs.org/package/upper-case
|
33
|
+
[bundlephobia-image]: https://img.shields.io/bundlephobia/minzip/upper-case.svg
|
34
|
+
[bundlephobia-url]: https://bundlephobia.com/result?p=upper-case
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.upperCase = exports.localeUpperCase = void 0;
|
4
|
+
/**
|
5
|
+
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
6
|
+
*/
|
7
|
+
var SUPPORTED_LOCALE = {
|
8
|
+
tr: {
|
9
|
+
regexp: /[\u0069]/g,
|
10
|
+
map: {
|
11
|
+
i: "\u0130",
|
12
|
+
},
|
13
|
+
},
|
14
|
+
az: {
|
15
|
+
regexp: /[\u0069]/g,
|
16
|
+
map: {
|
17
|
+
i: "\u0130",
|
18
|
+
},
|
19
|
+
},
|
20
|
+
lt: {
|
21
|
+
regexp: /[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,
|
22
|
+
map: {
|
23
|
+
i̇: "\u0049",
|
24
|
+
j̇: "\u004A",
|
25
|
+
į̇: "\u012E",
|
26
|
+
i̇̀: "\u00CC",
|
27
|
+
i̇́: "\u00CD",
|
28
|
+
i̇̃: "\u0128",
|
29
|
+
},
|
30
|
+
},
|
31
|
+
};
|
32
|
+
/**
|
33
|
+
* Localized upper case.
|
34
|
+
*/
|
35
|
+
function localeUpperCase(str, locale) {
|
36
|
+
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
|
37
|
+
if (lang)
|
38
|
+
return upperCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
|
39
|
+
return upperCase(str);
|
40
|
+
}
|
41
|
+
exports.localeUpperCase = localeUpperCase;
|
42
|
+
/**
|
43
|
+
* Upper case as a function.
|
44
|
+
*/
|
45
|
+
function upperCase(str) {
|
46
|
+
return str.toUpperCase();
|
47
|
+
}
|
48
|
+
exports.upperCase = upperCase;
|
49
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAQA;;GAEG;AACH,IAAM,gBAAgB,GAA2B;IAC/C,EAAE,EAAE;QACF,MAAM,EAAE,WAAW;QACnB,GAAG,EAAE;YACH,CAAC,EAAE,QAAQ;SACZ;KACF;IACD,EAAE,EAAE;QACF,MAAM,EAAE,WAAW;QACnB,GAAG,EAAE;YACH,CAAC,EAAE,QAAQ;SACZ;KACF;IACD,EAAE,EAAE;QACF,MAAM,EAAE,8DAA8D;QACtE,GAAG,EAAE;YACH,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,QAAQ;YACZ,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;SACd;KACF;CACF,CAAC;AAEF;;GAEG;AACH,SAAgB,eAAe,CAAC,GAAW,EAAE,MAAc;IACzD,IAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACpD,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAC,CAAC,IAAK,OAAA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAX,CAAW,CAAC,CAAC,CAAC;IACzE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAJD,0CAIC;AAED;;GAEG;AACH,SAAgB,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC3B,CAAC;AAFD,8BAEC","sourcesContent":["/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n az: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n lt: {\n regexp: /[\\u0069\\u006A\\u012F]\\u0307|\\u0069\\u0307[\\u0300\\u0301\\u0303]/g,\n map: {\n i̇: \"\\u0049\",\n j̇: \"\\u004A\",\n į̇: \"\\u012E\",\n i̇̀: \"\\u00CC\",\n i̇́: \"\\u00CD\",\n i̇̃: \"\\u0128\",\n },\n },\n};\n\n/**\n * Localized upper case.\n */\nexport function localeUpperCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return upperCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return upperCase(str);\n}\n\n/**\n * Upper case as a function.\n */\nexport function upperCase(str: string) {\n return str.toUpperCase();\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
var _1 = require(".");
|
4
|
+
var TEST_CASES = [
|
5
|
+
["", ""],
|
6
|
+
["test", "TEST"],
|
7
|
+
["test string", "TEST STRING"],
|
8
|
+
["Test String", "TEST STRING"],
|
9
|
+
["\u0131", "I"],
|
10
|
+
];
|
11
|
+
var LOCALE_TEST_CASES = [["i", "\u0130", "tr"]];
|
12
|
+
describe("upper case", function () {
|
13
|
+
var _loop_1 = function (input, result) {
|
14
|
+
it(input + " -> " + result, function () {
|
15
|
+
expect(_1.upperCase(input)).toEqual(result);
|
16
|
+
});
|
17
|
+
};
|
18
|
+
for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) {
|
19
|
+
var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1];
|
20
|
+
_loop_1(input, result);
|
21
|
+
}
|
22
|
+
});
|
23
|
+
describe("locale upper case", function () {
|
24
|
+
var _loop_2 = function (input, result, locale) {
|
25
|
+
it(locale + ": " + input + " -> " + result, function () {
|
26
|
+
expect(_1.localeUpperCase(input, locale)).toEqual(result);
|
27
|
+
});
|
28
|
+
};
|
29
|
+
for (var _i = 0, LOCALE_TEST_CASES_1 = LOCALE_TEST_CASES; _i < LOCALE_TEST_CASES_1.length; _i++) {
|
30
|
+
var _a = LOCALE_TEST_CASES_1[_i], input = _a[0], result = _a[1], locale = _a[2];
|
31
|
+
_loop_2(input, result, locale);
|
32
|
+
}
|
33
|
+
});
|
34
|
+
//# sourceMappingURL=index.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":";;AAAA,sBAA+C;AAE/C,IAAM,UAAU,GAAuB;IACrC,CAAC,EAAE,EAAE,EAAE,CAAC;IACR,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,QAAQ,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,IAAM,iBAAiB,GAA+B,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AAE9E,QAAQ,CAAC,YAAY,EAAE;4BACT,KAAK,EAAE,MAAM;QACvB,EAAE,CAAI,KAAK,YAAO,MAAQ,EAAE;YAC1B,MAAM,CAAC,YAAS,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;;IAHL,KAA8B,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU;QAA7B,IAAA,qBAAe,EAAd,KAAK,QAAA,EAAE,MAAM,QAAA;gBAAb,KAAK,EAAE,MAAM;KAIxB;AACH,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,mBAAmB,EAAE;4BAChB,KAAK,EAAE,MAAM,EAAE,MAAM;QAC/B,EAAE,CAAI,MAAM,UAAK,KAAK,YAAO,MAAQ,EAAE;YACrC,MAAM,CAAC,kBAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;;IAHL,KAAsC,UAAiB,EAAjB,uCAAiB,EAAjB,+BAAiB,EAAjB,IAAiB;QAA5C,IAAA,4BAAuB,EAAtB,KAAK,QAAA,EAAE,MAAM,QAAA,EAAE,MAAM,QAAA;gBAArB,KAAK,EAAE,MAAM,EAAE,MAAM;KAIhC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { upperCase, localeUpperCase } from \".\";\n\nconst TEST_CASES: [string, string][] = [\n [\"\", \"\"],\n [\"test\", \"TEST\"],\n [\"test string\", \"TEST STRING\"],\n [\"Test String\", \"TEST STRING\"],\n [\"\\u0131\", \"I\"],\n];\n\nconst LOCALE_TEST_CASES: [string, string, string][] = [[\"i\", \"\\u0130\", \"tr\"]];\n\ndescribe(\"upper case\", () => {\n for (const [input, result] of TEST_CASES) {\n it(`${input} -> ${result}`, () => {\n expect(upperCase(input)).toEqual(result);\n });\n }\n});\n\ndescribe(\"locale upper case\", () => {\n for (const [input, result, locale] of LOCALE_TEST_CASES) {\n it(`${locale}: ${input} -> ${result}`, () => {\n expect(localeUpperCase(input, locale)).toEqual(result);\n });\n }\n});\n"]}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
/**
|
2
|
+
* Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
|
3
|
+
*/
|
4
|
+
var SUPPORTED_LOCALE = {
|
5
|
+
tr: {
|
6
|
+
regexp: /[\u0069]/g,
|
7
|
+
map: {
|
8
|
+
i: "\u0130",
|
9
|
+
},
|
10
|
+
},
|
11
|
+
az: {
|
12
|
+
regexp: /[\u0069]/g,
|
13
|
+
map: {
|
14
|
+
i: "\u0130",
|
15
|
+
},
|
16
|
+
},
|
17
|
+
lt: {
|
18
|
+
regexp: /[\u0069\u006A\u012F]\u0307|\u0069\u0307[\u0300\u0301\u0303]/g,
|
19
|
+
map: {
|
20
|
+
i̇: "\u0049",
|
21
|
+
j̇: "\u004A",
|
22
|
+
į̇: "\u012E",
|
23
|
+
i̇̀: "\u00CC",
|
24
|
+
i̇́: "\u00CD",
|
25
|
+
i̇̃: "\u0128",
|
26
|
+
},
|
27
|
+
},
|
28
|
+
};
|
29
|
+
/**
|
30
|
+
* Localized upper case.
|
31
|
+
*/
|
32
|
+
export function localeUpperCase(str, locale) {
|
33
|
+
var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
|
34
|
+
if (lang)
|
35
|
+
return upperCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
|
36
|
+
return upperCase(str);
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Upper case as a function.
|
40
|
+
*/
|
41
|
+
export function upperCase(str) {
|
42
|
+
return str.toUpperCase();
|
43
|
+
}
|
44
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA;;GAEG;AACH,IAAM,gBAAgB,GAA2B;IAC/C,EAAE,EAAE;QACF,MAAM,EAAE,WAAW;QACnB,GAAG,EAAE;YACH,CAAC,EAAE,QAAQ;SACZ;KACF;IACD,EAAE,EAAE;QACF,MAAM,EAAE,WAAW;QACnB,GAAG,EAAE;YACH,CAAC,EAAE,QAAQ;SACZ;KACF;IACD,EAAE,EAAE;QACF,MAAM,EAAE,8DAA8D;QACtE,GAAG,EAAE;YACH,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,QAAQ;YACZ,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;YACb,GAAG,EAAE,QAAQ;SACd;KACF;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,GAAW,EAAE,MAAc;IACzD,IAAM,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACpD,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,UAAC,CAAC,IAAK,OAAA,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAX,CAAW,CAAC,CAAC,CAAC;IACzE,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC;AAC3B,CAAC","sourcesContent":["/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n az: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n lt: {\n regexp: /[\\u0069\\u006A\\u012F]\\u0307|\\u0069\\u0307[\\u0300\\u0301\\u0303]/g,\n map: {\n i̇: \"\\u0049\",\n j̇: \"\\u004A\",\n į̇: \"\\u012E\",\n i̇̀: \"\\u00CC\",\n i̇́: \"\\u00CD\",\n i̇̃: \"\\u0128\",\n },\n },\n};\n\n/**\n * Localized upper case.\n */\nexport function localeUpperCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return upperCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return upperCase(str);\n}\n\n/**\n * Upper case as a function.\n */\nexport function upperCase(str: string) {\n return str.toUpperCase();\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { upperCase, localeUpperCase } from ".";
|
2
|
+
var TEST_CASES = [
|
3
|
+
["", ""],
|
4
|
+
["test", "TEST"],
|
5
|
+
["test string", "TEST STRING"],
|
6
|
+
["Test String", "TEST STRING"],
|
7
|
+
["\u0131", "I"],
|
8
|
+
];
|
9
|
+
var LOCALE_TEST_CASES = [["i", "\u0130", "tr"]];
|
10
|
+
describe("upper case", function () {
|
11
|
+
var _loop_1 = function (input, result) {
|
12
|
+
it(input + " -> " + result, function () {
|
13
|
+
expect(upperCase(input)).toEqual(result);
|
14
|
+
});
|
15
|
+
};
|
16
|
+
for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) {
|
17
|
+
var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1];
|
18
|
+
_loop_1(input, result);
|
19
|
+
}
|
20
|
+
});
|
21
|
+
describe("locale upper case", function () {
|
22
|
+
var _loop_2 = function (input, result, locale) {
|
23
|
+
it(locale + ": " + input + " -> " + result, function () {
|
24
|
+
expect(localeUpperCase(input, locale)).toEqual(result);
|
25
|
+
});
|
26
|
+
};
|
27
|
+
for (var _i = 0, LOCALE_TEST_CASES_1 = LOCALE_TEST_CASES; _i < LOCALE_TEST_CASES_1.length; _i++) {
|
28
|
+
var _a = LOCALE_TEST_CASES_1[_i], input = _a[0], result = _a[1], locale = _a[2];
|
29
|
+
_loop_2(input, result, locale);
|
30
|
+
}
|
31
|
+
});
|
32
|
+
//# sourceMappingURL=index.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,GAAG,CAAC;AAE/C,IAAM,UAAU,GAAuB;IACrC,CAAC,EAAE,EAAE,EAAE,CAAC;IACR,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,QAAQ,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,IAAM,iBAAiB,GAA+B,CAAC,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;AAE9E,QAAQ,CAAC,YAAY,EAAE;4BACT,KAAK,EAAE,MAAM;QACvB,EAAE,CAAI,KAAK,YAAO,MAAQ,EAAE;YAC1B,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;;IAHL,KAA8B,UAAU,EAAV,yBAAU,EAAV,wBAAU,EAAV,IAAU;QAA7B,IAAA,qBAAe,EAAd,KAAK,QAAA,EAAE,MAAM,QAAA;gBAAb,KAAK,EAAE,MAAM;KAIxB;AACH,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,mBAAmB,EAAE;4BAChB,KAAK,EAAE,MAAM,EAAE,MAAM;QAC/B,EAAE,CAAI,MAAM,UAAK,KAAK,YAAO,MAAQ,EAAE;YACrC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;;IAHL,KAAsC,UAAiB,EAAjB,uCAAiB,EAAjB,+BAAiB,EAAjB,IAAiB;QAA5C,IAAA,4BAAuB,EAAtB,KAAK,QAAA,EAAE,MAAM,QAAA,EAAE,MAAM,QAAA;gBAArB,KAAK,EAAE,MAAM,EAAE,MAAM;KAIhC;AACH,CAAC,CAAC,CAAC","sourcesContent":["import { upperCase, localeUpperCase } from \".\";\n\nconst TEST_CASES: [string, string][] = [\n [\"\", \"\"],\n [\"test\", \"TEST\"],\n [\"test string\", \"TEST STRING\"],\n [\"Test String\", \"TEST STRING\"],\n [\"\\u0131\", \"I\"],\n];\n\nconst LOCALE_TEST_CASES: [string, string, string][] = [[\"i\", \"\\u0130\", \"tr\"]];\n\ndescribe(\"upper case\", () => {\n for (const [input, result] of TEST_CASES) {\n it(`${input} -> ${result}`, () => {\n expect(upperCase(input)).toEqual(result);\n });\n }\n});\n\ndescribe(\"locale upper case\", () => {\n for (const [input, result, locale] of LOCALE_TEST_CASES) {\n it(`${locale}: ${input} -> ${result}`, () => {\n expect(localeUpperCase(input, locale)).toEqual(result);\n });\n }\n});\n"]}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
{
|
2
|
+
"name": "upper-case",
|
3
|
+
"version": "2.0.2",
|
4
|
+
"description": "Transforms the string to upper case",
|
5
|
+
"main": "dist/index.js",
|
6
|
+
"typings": "dist/index.d.ts",
|
7
|
+
"module": "dist.es2015/index.js",
|
8
|
+
"sideEffects": false,
|
9
|
+
"jsnext:main": "dist.es2015/index.js",
|
10
|
+
"files": [
|
11
|
+
"dist/",
|
12
|
+
"dist.es2015/",
|
13
|
+
"LICENSE"
|
14
|
+
],
|
15
|
+
"scripts": {
|
16
|
+
"lint": "tslint \"src/**/*\" --project tsconfig.json",
|
17
|
+
"build": "rimraf dist/ dist.es2015/ && tsc && tsc -P tsconfig.es2015.json",
|
18
|
+
"specs": "jest --coverage",
|
19
|
+
"test": "npm run build && npm run lint && npm run specs",
|
20
|
+
"size": "size-limit",
|
21
|
+
"prepare": "npm run build"
|
22
|
+
},
|
23
|
+
"repository": {
|
24
|
+
"type": "git",
|
25
|
+
"url": "git://github.com/blakeembrey/change-case.git"
|
26
|
+
},
|
27
|
+
"keywords": [
|
28
|
+
"upper",
|
29
|
+
"case",
|
30
|
+
"upcase",
|
31
|
+
"locale",
|
32
|
+
"convert",
|
33
|
+
"transform"
|
34
|
+
],
|
35
|
+
"author": {
|
36
|
+
"name": "Blake Embrey",
|
37
|
+
"email": "hello@blakeembrey.com",
|
38
|
+
"url": "http://blakeembrey.me"
|
39
|
+
},
|
40
|
+
"license": "MIT",
|
41
|
+
"bugs": {
|
42
|
+
"url": "https://github.com/blakeembrey/change-case/issues"
|
43
|
+
},
|
44
|
+
"homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/upper-case#readme",
|
45
|
+
"size-limit": [
|
46
|
+
{
|
47
|
+
"path": "dist/index.js",
|
48
|
+
"limit": "250 B"
|
49
|
+
}
|
50
|
+
],
|
51
|
+
"jest": {
|
52
|
+
"roots": [
|
53
|
+
"<rootDir>/src/"
|
54
|
+
],
|
55
|
+
"transform": {
|
56
|
+
"\\.tsx?$": "ts-jest"
|
57
|
+
},
|
58
|
+
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
|
59
|
+
"moduleFileExtensions": [
|
60
|
+
"ts",
|
61
|
+
"tsx",
|
62
|
+
"js",
|
63
|
+
"jsx",
|
64
|
+
"json",
|
65
|
+
"node"
|
66
|
+
]
|
67
|
+
},
|
68
|
+
"publishConfig": {
|
69
|
+
"access": "public"
|
70
|
+
},
|
71
|
+
"devDependencies": {
|
72
|
+
"@size-limit/preset-small-lib": "^2.2.1",
|
73
|
+
"@types/jest": "^24.0.23",
|
74
|
+
"@types/node": "^12.12.14",
|
75
|
+
"jest": "^24.9.0",
|
76
|
+
"rimraf": "^3.0.0",
|
77
|
+
"ts-jest": "^24.2.0",
|
78
|
+
"tslint": "^5.20.1",
|
79
|
+
"tslint-config-prettier": "^1.18.0",
|
80
|
+
"tslint-config-standard": "^9.0.0",
|
81
|
+
"typescript": "^4.1.2"
|
82
|
+
},
|
83
|
+
"dependencies": {
|
84
|
+
"tslib": "^2.0.3"
|
85
|
+
}
|
86
|
+
}
|