@util.js/strings 0.41.3 → 0.41.5

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/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  <p>
6
6
  <a href="https://www.npmjs.com/package/@util.js/strings"><img alt="NPM Status" src="https://img.shields.io/npm/v/@util.js/strings.svg?style=flat"></a>
7
- <a href="https://travis-ci.org/creemama/utiljs"><img alt="Travis CI Build Status" src="https://img.shields.io/travis/creemama/utiljs/master.svg?style=flat-square&label=Travis+CI"></a>
8
7
  </p>
9
8
 
10
9
  @util.js/strings is part of [Util.js](https://github.com/creemama/utiljs).
package/dist/Strings.js CHANGED
@@ -15,7 +15,7 @@ var Strings = /*#__PURE__*/function () {
15
15
  function Strings() {
16
16
  (0, _classCallCheck2["default"])(this, Strings);
17
17
  }
18
- (0, _createClass2["default"])(Strings, [{
18
+ return (0, _createClass2["default"])(Strings, [{
19
19
  key: "base64ToBase64Url",
20
20
  value: function base64ToBase64Url() {
21
21
  var _base64url;
@@ -104,7 +104,6 @@ var Strings = /*#__PURE__*/function () {
104
104
  return str.replace(/(<([^>]+)>)/gi, "");
105
105
  }
106
106
  }]);
107
- return Strings;
108
107
  }();
109
108
  module.exports = Strings;
110
109
  var dependencies = {};
package/lib/Strings.js CHANGED
@@ -63,7 +63,7 @@ class Strings {
63
63
  z = z + "";
64
64
  if (z.length > 1)
65
65
  throw new Error(
66
- "The padding character must have a length of 1 but was " + z.length
66
+ "The padding character must have a length of 1 but was " + z.length,
67
67
  );
68
68
  n = n + "";
69
69
  return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Chris Topher <c@creemama.com>",
3
3
  "dependencies": {
4
- "@babel/runtime-corejs3": "7.21.0",
4
+ "@babel/runtime-corejs3": "7.29.7",
5
5
  "base64url": "3.0.1"
6
6
  },
7
7
  "dependencies-comments": [
@@ -34,6 +34,5 @@
34
34
  "type": "git",
35
35
  "url": "https://github.com/creemama/utiljs/tree/master/packages/utiljs-strings"
36
36
  },
37
- "version": "0.41.3",
38
- "gitHead": "e17139b7f85c3abec178d8facdacc2aa6c5bb553"
37
+ "version": "0.41.5"
39
38
  }
@@ -8,18 +8,20 @@ describe("Strings", () => {
8
8
  it("should operate normally", () => {
9
9
  // From https://www.npmjs.com/package/base64url
10
10
  expect(
11
- strings.base64UrlEncode("ladies and gentlemen we are floating in space")
11
+ strings.base64UrlEncode(
12
+ "ladies and gentlemen we are floating in space",
13
+ ),
12
14
  ).to.equal(
13
- "bGFkaWVzIGFuZCBnZW50bGVtZW4gd2UgYXJlIGZsb2F0aW5nIGluIHNwYWNl"
15
+ "bGFkaWVzIGFuZCBnZW50bGVtZW4gd2UgYXJlIGZsb2F0aW5nIGluIHNwYWNl",
14
16
  );
15
17
  expect(
16
- strings.base64UrlDecode("cmlkZTogZHJlYW1zIGJ1cm4gZG93bg")
18
+ strings.base64UrlDecode("cmlkZTogZHJlYW1zIGJ1cm4gZG93bg"),
17
19
  ).to.equal("ride: dreams burn down");
18
20
  expect(
19
- strings.base64ToBase64Url("qL8R4QIcQ/ZsRqOAbeRfcZhilN/MksRtDaErMA==")
21
+ strings.base64ToBase64Url("qL8R4QIcQ/ZsRqOAbeRfcZhilN/MksRtDaErMA=="),
20
22
  ).to.equal("qL8R4QIcQ_ZsRqOAbeRfcZhilN_MksRtDaErMA");
21
23
  expect(
22
- strings.base64UrlToBase64("qL8R4QIcQ_ZsRqOAbeRfcZhilN_MksRtDaErMA")
24
+ strings.base64UrlToBase64("qL8R4QIcQ_ZsRqOAbeRfcZhilN_MksRtDaErMA"),
23
25
  ).to.equal("qL8R4QIcQ/ZsRqOAbeRfcZhilN/MksRtDaErMA==");
24
26
  const buf = Buffer.alloc(13);
25
27
  buf.writeUInt8(0x73, 0);
@@ -36,7 +38,7 @@ describe("Strings", () => {
36
38
  buf.writeUInt8(0x65, 11);
37
39
  buf.writeUInt8(0x64, 12);
38
40
  expect(
39
- strings.base64UrlToBuffer("c3Bpcml0dWFsaXplZA").toString()
41
+ strings.base64UrlToBuffer("c3Bpcml0dWFsaXplZA").toString(),
40
42
  ).to.equal(buf.toString());
41
43
  });
42
44
  });
@@ -86,7 +88,7 @@ describe("Strings", () => {
86
88
  expect(
87
89
  strings.isString(() => {
88
90
  return "";
89
- })
91
+ }),
90
92
  ).to.be.false;
91
93
  expect(strings.isString({})).to.be.false;
92
94
  });
@@ -135,7 +137,7 @@ describe("Strings", () => {
135
137
  it("should operate normally", () => {
136
138
  expect(strings.stripTags("frog")).to.equal("frog");
137
139
  expect(
138
- strings.stripTags('<html><>frog</html><span style=""> </span>')
140
+ strings.stripTags('<html><>frog</html><span style=""> </span>'),
139
141
  ).to.equal("<>frog ");
140
142
  });
141
143
  it("should throw an error if any argument is null", () => {
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright 2018 Chris Topher (c@creemama.com)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
- of the Software, and to permit persons to whom the Software is furnished to do
10
- so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.