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

@chevrotain/utils

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chevrotain/utils - npm Package Compare versions

Comparing version 9.0.0 to 9.0.2

3

lib/src/api.d.ts
export declare function isEmpty(arr: any[]): boolean;
export declare function keys(obj: any): string[];
export declare function values(obj: any): any[];
export declare function mapValues<I, O>(obj: Object, callback: (value: I, key?: string) => O): O[];
export declare function mapValues<I, O>(obj: Record<string, I>, callback: (value: I, key?: string) => O): O[];
export declare function map<I, O>(arr: I[], callback: (I: any, idx?: number) => O): O[];

@@ -75,1 +75,2 @@ export declare function flatten<T>(arr: any[]): T[];

export declare function toFastProperties(toBecomeFast: any): any;
export declare function upperFirst(str: string): string;

@@ -18,2 +18,3 @@ "use strict";

exports.toFastProperties = exports.timer = exports.peek = exports.isES2015MapSupported = exports.PRINT_WARNING = exports.PRINT_ERROR = exports.packArray = exports.IDENTITY = exports.NOOP = exports.merge = exports.groupBy = exports.defaults = exports.assignNoOverwrite = exports.assign = exports.zipObject = exports.sortBy = exports.indexOf = exports.some = exports.difference = exports.every = exports.isObject = exports.isRegExp = exports.isArray = exports.partial = exports.uniq = exports.compact = exports.reduce = exports.findAll = exports.find = exports.cloneObj = exports.cloneArr = exports.contains = exports.has = exports.pick = exports.reject = exports.filter = exports.dropRight = exports.drop = exports.isFunction = exports.isUndefined = exports.isString = exports.forEach = exports.last = exports.first = exports.flatten = exports.map = exports.mapValues = exports.values = exports.keys = exports.isEmpty = void 0;
exports.upperFirst = void 0;
function isEmpty(arr) {

@@ -457,2 +458,17 @@ return arr && arr.length === 0;

exports.toFastProperties = toFastProperties;
function upperFirst(str) {
if (!str) {
return str;
}
var firstChar = getCharacterFromCodePointAt(str, 0);
return firstChar.toUpperCase() + str.substring(firstChar.length);
}
exports.upperFirst = upperFirst;
var surrogatePairPattern = /[\uD800-\uDBFF][\uDC00-\uDFFF]/;
function getCharacterFromCodePointAt(str, idx) {
var surrogatePairCandidate = str.substring(idx, idx + 1);
return surrogatePairPattern.test(surrogatePairCandidate)
? surrogatePairCandidate
: str[idx];
}
//# sourceMappingURL=api.js.map
{
"name": "@chevrotain/utils",
"version": "9.0.0",
"version": "9.0.2",
"description": "common utilities",

@@ -13,3 +13,3 @@ "keywords": [],

},
"typings": "api.d.ts",
"typings": "lib/src/api.d.ts",
"main": "lib/src/api.js",

@@ -43,3 +43,3 @@ "files": [

},
"gitHead": "ca48f1b64ea7768c0cf0248572e5270f593b18c8"
"gitHead": "027c35d42c4976fa7ef438c3af8690783989cfb6"
}
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