Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

utfstring

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utfstring - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

2

dist/utf_string.d.ts

@@ -9,2 +9,4 @@ /** Regular expression for matching surrogate pairs. */

private readonly unsafeString;
/** Index signature: implemented via Proxy returned by the constructor. */
[index: number]: UtfString;
/**

@@ -11,0 +13,0 @@ * Creates a new UTF-safe string object.

@@ -42,2 +42,9 @@ "use strict";

}
return new Proxy(this, {
get: (obj, key) => {
return typeof key === "string" && Number.isInteger(Number(key))
? obj.charAt(parseInt(key, 0))
: obj[key];
},
});
}

@@ -44,0 +51,0 @@ /**

20

package.json
{
"name": "utfstring",
"version": "3.0.1",
"version": "3.1.0",
"description": "UTF-safe string operations",

@@ -27,11 +27,12 @@ "repository": {

"devDependencies": {
"@types/mocha": "9.1.1",
"expect": "29.0.3",
"mocha": "10.0.0",
"prettier": "2.7.1",
"@types/node": "14.14.31",
"@types/mocha": "10.0.1",
"expect": "29.3.1",
"mocha": "10.1.0",
"prettier": "2.8.0",
"rimraf": "3.0.2",
"ts-node": "10.9.1",
"typescript": "4.8.3",
"webpack": "5.74.0",
"webpack-cli": "4.10.0"
"typescript": "4.9.3",
"webpack": "5.75.0",
"webpack-cli": "5.0.0"
},

@@ -41,4 +42,5 @@ "scripts": {

"build": "rimraf dist browser && tsc && webpack",
"test": "mocha -r ts-node/register -reporter min 'test/**/*.ts'"
"test": "mocha -r ts-node/register -reporter min 'test/**/*.ts'",
"prepublishOnly": "npm test && npm run build"
}
}

@@ -69,5 +69,7 @@ [![NPM Version](https://img.shields.io/npm/v/utfstring?color=33cd56&logo=npm)](https://www.npmjs.com/package/utfstring)

* `[Number index]` - Indexer: returns the character at the given index from the string.
* `*[Symbol.iterator]` - Allows you to iterate over the characters of the string using a `for-of` loop.
* `charAt(Integer index)` - Returns the character at the given index from the string.
* `charAt(Integer index)` - Same as using the indexer.

@@ -74,0 +76,0 @@ * `charCodeAt(Integer index)` - Returns the Unicode codepoint at the given index.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc