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

@remirror/core-helpers

Package Overview
Dependencies
Maintainers
1
Versions
264
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remirror/core-helpers - npm Package Compare versions

Comparing version 0.0.0-pr905.1 to 0.0.0-pr911.1

19

dist/declarations/src/core-helpers.d.ts

@@ -1,6 +0,16 @@

import type { ClassName } from '@linaria/core/types/cx';
import omit from 'object.omit';
import pick from 'object.pick';
import type { AnyConstructor, AnyFunction, ConditionalExcept, Nullable, Primitive, Shape, UnknownShape } from '@remirror/types';
declare type TupleRange<Size extends number> = Size extends Size ? number extends Size ? number[] : _NumberRangeTuple<[], Size> : never;
import type { ConditionalExcept, Primitive } from 'type-fest';
interface Shape {
[key: string]: any;
}
declare type UnknownShape<Type = unknown> = Record<string, Type>;
declare type Nullable<Type> = Type | null | undefined;
declare type AnyConstructor<Type = any> = new (...args: any[]) => Type;
declare type AnyFunction<Type = any> = (...args: any[]) => Type;
declare type GetRecursivePath<Type, Key extends keyof Type> = Key extends string ? Type[Key] extends Record<string, any> ? `${Key}.${GetRecursivePath<Type[Key], Exclude<keyof Type[Key], keyof any[]>> & string}` | `${Key}.${Exclude<keyof Type[Key], keyof any[]> & string}` : never : never;
declare type GetJoinedPath<Type> = GetRecursivePath<Type, keyof Type> | keyof Type;
export declare type GetPath<Type> = GetJoinedPath<Type> extends string | keyof Type ? GetJoinedPath<Type> : keyof Type;
export declare type GetPathValue<Type, Path extends GetPath<Type>> = Path extends `${infer Key}.${infer Rest}` ? Key extends keyof Type ? Rest extends GetPath<Type[Key]> ? GetPathValue<Type[Key], Rest> : never : never : Path extends keyof Type ? Type[Path] : never;
export declare type TupleRange<Size extends number> = Size extends Size ? number extends Size ? number[] : _NumberRangeTuple<[], Size> : never;
declare type _NumberRangeTuple<Tuple extends readonly unknown[], Length extends number> = Tuple['length'] extends Length ? Tuple : _NumberRangeTuple<[...Tuple, Tuple['length']], Length>;

@@ -444,3 +454,3 @@ /**

*/
export declare function uniqueBy<Item = any>(array: Item[], getValue: ((item: Item) => unknown) | string | string[], fromStart?: boolean): Item[];
export declare function uniqueBy<Item = any>(array: Item[], getValue: ((item: Item) => unknown) | GetPath<Item>, fromStart?: boolean): Item[];
/**

@@ -486,5 +496,4 @@ * Create a range from start to end.

export declare function getLazyArray<Type>(value: Type[] | (() => Type[])): Type[];
export declare function cx(...classes: ClassName[]): string;
export { camelCase, capitalCase, constantCase, kebabCase, pascalCase, pathCase, snakeCase, spaceCase, } from 'case-anything';
export { debounce, throttle } from 'throttle-debounce';
export { omit, pick };

@@ -11,3 +11,2 @@ 'use strict';

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var core = require('@linaria/core');
var deepmerge = require('deepmerge');

@@ -851,10 +850,10 @@ var fastDeepEqual = require('fast-deep-equal');

index = _step2$value[0],
key = _step2$value[1];
_key3 = _step2$value[1];
var shouldDelete = index >= path.length - 1;
var _item2 = value[key];
var _item2 = value[_key3];
if (shouldDelete) {
if (isArray(value)) {
var indexKey = Number.parseInt(key.toString(), 10);
var indexKey = Number.parseInt(_key3.toString(), 10);

@@ -865,3 +864,3 @@ if (isNumber(indexKey)) {

} else {
Reflect.deleteProperty(value, key);
Reflect.deleteProperty(value, _key3);
}

@@ -877,3 +876,3 @@

_item2 = isArray(_item2) ? [..._item2] : _objectSpread({}, _item2);
value[key] = _item2;
value[_key3] = _item2;
value = _item2;

@@ -983,4 +982,4 @@ }

function within(value) {
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
rest[_key3 - 1] = arguments[_key3];
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key4 = 1; _key4 < _len3; _key4++) {
rest[_key4 - 1] = arguments[_key4];
}

@@ -1018,5 +1017,2 @@

return value;
}
function cx() {
return uniqueArray(core.cx(...arguments).split(' ')).join(' ');
} // The following are forward exports for other libraries. I've structured it

@@ -1288,3 +1284,2 @@

exports.clone = clone;
exports.cx = cx;
exports.deepMerge = deepMerge;

@@ -1291,0 +1286,0 @@ exports.entries = entries;

@@ -7,3 +7,2 @@ import { BaseError } from 'make-error';

import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import { cx as cx$1 } from '@linaria/core';
import deepmerge from 'deepmerge';

@@ -841,10 +840,10 @@ import fastDeepEqual from 'fast-deep-equal';

index = _step2$value[0],
key = _step2$value[1];
_key3 = _step2$value[1];
var shouldDelete = index >= path.length - 1;
var _item2 = value[key];
var _item2 = value[_key3];
if (shouldDelete) {
if (isArray(value)) {
var indexKey = Number.parseInt(key.toString(), 10);
var indexKey = Number.parseInt(_key3.toString(), 10);

@@ -855,3 +854,3 @@ if (isNumber(indexKey)) {

} else {
Reflect.deleteProperty(value, key);
Reflect.deleteProperty(value, _key3);
}

@@ -867,3 +866,3 @@

_item2 = isArray(_item2) ? [..._item2] : _objectSpread({}, _item2);
value[key] = _item2;
value[_key3] = _item2;
value = _item2;

@@ -973,4 +972,4 @@ }

function within(value) {
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
rest[_key3 - 1] = arguments[_key3];
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key4 = 1; _key4 < _len3; _key4++) {
rest[_key4 - 1] = arguments[_key4];
}

@@ -1008,5 +1007,2 @@

return value;
}
function cx() {
return uniqueArray(cx$1(...arguments).split(' ')).join(' ');
} // The following are forward exports for other libraries. I've structured it

@@ -1197,2 +1193,2 @@

export { Cast, RemirrorError, assert, assertGet, callIfDefined, capitalize, clamp, cleanupOS, clone, cx, deepMerge, entries, findMatches, flattenArray, format, freeze, get, getLazyArray, hasOwnProperty, includes, invariant, isAndroidOS, isArray, isBoolean, isClass, isDate, isDirectInstanceOf, isEmptyArray, isEmptyObject, isEqual, isError, isFunction, isInstanceOf, isInteger, isMap, isNativePromise, isNonEmptyArray, isNull, isNullOrUndefined, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSafeInteger, isSet, isString, isSymbol, isUndefined, keys, last, noop, object, omitUndefined, randomFloat, randomInt, range, set, shallowClone, sort, startCase, take, toString, uniqueArray, uniqueBy, uniqueId, unset, values, within };
export { Cast, RemirrorError, assert, assertGet, callIfDefined, capitalize, clamp, cleanupOS, clone, deepMerge, entries, findMatches, flattenArray, format, freeze, get, getLazyArray, hasOwnProperty, includes, invariant, isAndroidOS, isArray, isBoolean, isClass, isDate, isDirectInstanceOf, isEmptyArray, isEmptyObject, isEqual, isError, isFunction, isInstanceOf, isInteger, isMap, isNativePromise, isNonEmptyArray, isNull, isNullOrUndefined, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSafeInteger, isSet, isString, isSymbol, isUndefined, keys, last, noop, object, omitUndefined, randomFloat, randomInt, range, set, shallowClone, sort, startCase, take, toString, uniqueArray, uniqueBy, uniqueId, unset, values, within };

@@ -11,3 +11,2 @@ 'use strict';

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var core = require('@linaria/core');
var deepmerge = require('deepmerge');

@@ -851,10 +850,10 @@ var fastDeepEqual = require('fast-deep-equal');

index = _step2$value[0],
key = _step2$value[1];
_key3 = _step2$value[1];
var shouldDelete = index >= path.length - 1;
var _item2 = value[key];
var _item2 = value[_key3];
if (shouldDelete) {
if (isArray(value)) {
var indexKey = Number.parseInt(key.toString(), 10);
var indexKey = Number.parseInt(_key3.toString(), 10);

@@ -865,3 +864,3 @@ if (isNumber(indexKey)) {

} else {
Reflect.deleteProperty(value, key);
Reflect.deleteProperty(value, _key3);
}

@@ -877,3 +876,3 @@

_item2 = isArray(_item2) ? [..._item2] : _objectSpread({}, _item2);
value[key] = _item2;
value[_key3] = _item2;
value = _item2;

@@ -983,4 +982,4 @@ }

function within(value) {
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
rest[_key3 - 1] = arguments[_key3];
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key4 = 1; _key4 < _len3; _key4++) {
rest[_key4 - 1] = arguments[_key4];
}

@@ -1018,5 +1017,2 @@

return value;
}
function cx() {
return uniqueArray(core.cx(...arguments).split(' ')).join(' ');
} // The following are forward exports for other libraries. I've structured it

@@ -1288,3 +1284,2 @@

exports.clone = clone;
exports.cx = cx;
exports.deepMerge = deepMerge;

@@ -1291,0 +1286,0 @@ exports.entries = entries;

@@ -11,3 +11,2 @@ 'use strict';

var _defineProperty = require('@babel/runtime/helpers/defineProperty');
var core = require('@linaria/core');
var deepmerge = require('deepmerge');

@@ -851,10 +850,10 @@ var fastDeepEqual = require('fast-deep-equal');

index = _step2$value[0],
key = _step2$value[1];
_key3 = _step2$value[1];
var shouldDelete = index >= path.length - 1;
var _item2 = value[key];
var _item2 = value[_key3];
if (shouldDelete) {
if (isArray(value)) {
var indexKey = Number.parseInt(key.toString(), 10);
var indexKey = Number.parseInt(_key3.toString(), 10);

@@ -865,3 +864,3 @@ if (isNumber(indexKey)) {

} else {
Reflect.deleteProperty(value, key);
Reflect.deleteProperty(value, _key3);
}

@@ -877,3 +876,3 @@

_item2 = isArray(_item2) ? [..._item2] : _objectSpread({}, _item2);
value[key] = _item2;
value[_key3] = _item2;
value = _item2;

@@ -983,4 +982,4 @@ }

function within(value) {
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
rest[_key3 - 1] = arguments[_key3];
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key4 = 1; _key4 < _len3; _key4++) {
rest[_key4 - 1] = arguments[_key4];
}

@@ -1018,5 +1017,2 @@

return value;
}
function cx() {
return uniqueArray(core.cx(...arguments).split(' ')).join(' ');
} // The following are forward exports for other libraries. I've structured it

@@ -1226,3 +1222,2 @@

exports.clone = clone;
exports.cx = cx;
exports.deepMerge = deepMerge;

@@ -1229,0 +1224,0 @@ exports.entries = entries;

@@ -7,3 +7,2 @@ import { BaseError } from 'make-error';

import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import { cx as cx$1 } from '@linaria/core';
import deepmerge from 'deepmerge';

@@ -841,10 +840,10 @@ import fastDeepEqual from 'fast-deep-equal';

index = _step2$value[0],
key = _step2$value[1];
_key3 = _step2$value[1];
var shouldDelete = index >= path.length - 1;
var _item2 = value[key];
var _item2 = value[_key3];
if (shouldDelete) {
if (isArray(value)) {
var indexKey = Number.parseInt(key.toString(), 10);
var indexKey = Number.parseInt(_key3.toString(), 10);

@@ -855,3 +854,3 @@ if (isNumber(indexKey)) {

} else {
Reflect.deleteProperty(value, key);
Reflect.deleteProperty(value, _key3);
}

@@ -867,3 +866,3 @@

_item2 = isArray(_item2) ? [..._item2] : _objectSpread({}, _item2);
value[key] = _item2;
value[_key3] = _item2;
value = _item2;

@@ -973,4 +972,4 @@ }

function within(value) {
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
rest[_key3 - 1] = arguments[_key3];
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key4 = 1; _key4 < _len3; _key4++) {
rest[_key4 - 1] = arguments[_key4];
}

@@ -1008,5 +1007,2 @@

return value;
}
function cx() {
return uniqueArray(cx$1(...arguments).split(' ')).join(' ');
} // The following are forward exports for other libraries. I've structured it

@@ -1197,2 +1193,2 @@

export { Cast, RemirrorError, assert, assertGet, callIfDefined, capitalize, clamp, cleanupOS, clone, cx, deepMerge, entries, findMatches, flattenArray, format, freeze, get, getLazyArray, hasOwnProperty, includes, invariant, isAndroidOS, isArray, isBoolean, isClass, isDate, isDirectInstanceOf, isEmptyArray, isEmptyObject, isEqual, isError, isFunction, isInstanceOf, isInteger, isMap, isNativePromise, isNonEmptyArray, isNull, isNullOrUndefined, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSafeInteger, isSet, isString, isSymbol, isUndefined, keys, last, noop, object, omitUndefined, randomFloat, randomInt, range, set, shallowClone, sort, startCase, take, toString, uniqueArray, uniqueBy, uniqueId, unset, values, within };
export { Cast, RemirrorError, assert, assertGet, callIfDefined, capitalize, clamp, cleanupOS, clone, deepMerge, entries, findMatches, flattenArray, format, freeze, get, getLazyArray, hasOwnProperty, includes, invariant, isAndroidOS, isArray, isBoolean, isClass, isDate, isDirectInstanceOf, isEmptyArray, isEmptyObject, isEqual, isError, isFunction, isInstanceOf, isInteger, isMap, isNativePromise, isNonEmptyArray, isNull, isNullOrUndefined, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSafeInteger, isSet, isString, isSymbol, isUndefined, keys, last, noop, object, omitUndefined, randomFloat, randomInt, range, set, shallowClone, sort, startCase, take, toString, uniqueArray, uniqueBy, uniqueId, unset, values, within };
{
"name": "@remirror/core-helpers",
"version": "0.0.0-pr905.1",
"version": "0.0.0-pr911.1",
"description": "Provide helper functions for the remirror codebase, kinda like a tiny lodash",

@@ -35,7 +35,5 @@ "homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/remirror__core-helpers",

"@babel/runtime": "^7.13.10",
"@linaria/core": "^3.0.0-beta.1",
"@remirror/core-constants": "0.0.0-pr905.1",
"@remirror/types": "0.0.0-pr905.1",
"@remirror/core-constants": "0.0.0-pr911.1",
"@types/object.omit": "^3.0.0",
"@types/object.pick": "^1.3.1",
"@types/object.pick": "^1.3.0",
"@types/throttle-debounce": "^2.1.0",

@@ -49,3 +47,4 @@ "case-anything": "^1.1.2",

"object.pick": "^1.3.0",
"throttle-debounce": "^3.0.1"
"throttle-debounce": "^3.0.1",
"type-fest": "^0.21.3"
},

@@ -52,0 +51,0 @@ "publishConfig": {

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