Socket
Socket
Sign inDemoInstall

@iconify/utils

Package Overview
Dependencies
6
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.3 to 2.0.4

lib/emoji/replace/find.cjs

2

lib/css/icon.d.ts

@@ -7,4 +7,4 @@ import { IconifyIcon } from '@iconify/types';

*/
declare function getIconCSS(icon: IconifyIcon, options: IconCSSIconOptions): string;
declare function getIconCSS(icon: IconifyIcon, options?: IconCSSIconOptions): string;
export { getIconCSS };

@@ -7,4 +7,4 @@ import { IconifyJSON } from '@iconify/types';

*/
declare function getIconsCSS(iconSet: IconifyJSON, names: string[], options: IconCSSIconSetOptions): string;
declare function getIconsCSS(iconSet: IconifyJSON, names: string[], options?: IconCSSIconSetOptions): string;
export { getIconsCSS };

@@ -42,3 +42,3 @@ /**

*/
interface IconCSSItemOptions extends IconCSSSharedOptions, IconCSSSelectorOptions, Required<IconCSSModeOptions> {
interface IconCSSItemOptions extends IconCSSSharedOptions, Required<IconCSSModeOptions> {
}

@@ -45,0 +45,0 @@ /**

/**
* Get emoji sequence from string
*
* Examples (shows same emoji sequence formatted differently):
* '1F441 FE0F 200D 1F5E8 FE0F' => [0x1f441, 0xfe0f, 0x200d, 0x1f5e8, 0xfe0f]
* '1f441-fe0f-200d-1f5e8-fe0f' => [0x1f441, 0xfe0f, 0x200d, 0x1f5e8, 0xfe0f]
* '\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8\\uFE0F' => [0x1f441, 0xfe0f, 0x200d, 0x1f5e8, 0xfe0f]
*/
declare function getEmojiSequenceFromString(value: string): number[];
/**
* Split sequence by joiner
* Split emoji sequence by joiner
*
* Result represents one emoji, split in smaller sequences separated by 0x200D
*
* Example:
* [0x1FAF1, 0x1F3FB, 0x200D, 0x1FAF2, 0x1F3FC] => [[0x1FAF1, 0x1F3FB], [0x1FAF2, 0x1F3FC]]
*/

@@ -11,2 +21,7 @@ declare function splitEmojiSequences(sequence: number[]): number[][];

* Join emoji sequences
*
* Parameter represents one emoji, split in smaller sequences
*
* Example:
* [[0x1FAF1, 0x1F3FB], [0x1FAF2, 0x1F3FC]] => [0x1FAF1, 0x1F3FB, 0x200D, 0x1FAF2, 0x1F3FC]
*/

@@ -24,3 +39,14 @@ declare function joinEmojiSequences(sequences: number[][]): number[];

declare function removeEmojiTones(sequence: number[]): number[];
/**
* Get unqualified sequence
*/
declare function getUnqualifiedEmojiSequence(sequence: number[]): number[];
/**
* Types for mapEmojiSequence()
*/
type MapCallback = (sequence: number[]) => number[];
interface MapOptions {
removeEmpty?: boolean;
removeDuplicates?: boolean;
}
/**

@@ -31,4 +57,4 @@ * Run function on sequences

*/
declare function mapEmojiSequences(sequences: number[][], callback: MapCallback, removeEmpty?: boolean): number[][];
declare function mapEmojiSequences(sequences: number[][], callback: MapCallback, options?: MapOptions): number[][];
export { getEmojiSequenceFromString, joinEmojiSequences, mapEmojiSequences, removeEmojiTones, removeEmojiVariations, splitEmojiSequences };
export { getEmojiSequenceFromString, getUnqualifiedEmojiSequence, joinEmojiSequences, mapEmojiSequences, removeEmojiTones, removeEmojiVariations, splitEmojiSequences };

@@ -12,4 +12,5 @@ /**

*/
type EmojiComponentType = 'skin-tone' | 'hair-style';
type Range = [number, number];
declare const emojiTones: Range[];
declare const emojiComponents: Record<EmojiComponentType, Range>;
/**

@@ -28,3 +29,7 @@ * Minimum UTF-32 number

declare const endUTF32Pair = 57344;
/**
* Emoji version as string
*/
declare const emojiVersion = "15.0";
export { emojiTones, endUTF32Pair, joinerEmoji, keycapEmoji, minUTF32, startUTF32Pair1, startUTF32Pair2, vs16Emoji };
export { EmojiComponentType, emojiComponents, emojiVersion, endUTF32Pair, joinerEmoji, keycapEmoji, minUTF32, startUTF32Pair1, startUTF32Pair2, vs16Emoji };

@@ -11,2 +11,5 @@ interface UnicodeFormattingOptions {

* Convert unicode number to string
*
* Example:
* 0x1F600 => '1F600'
*/

@@ -16,9 +19,8 @@ declare function getEmojiUnicodeString(code: number, options?: Partial<UnicodeFormattingOptions>): string;

* Convert unicode numbers sequence to string
*
* Example:
* [0x1f441, 0xfe0f] => '1f441-fe0f'
*/
declare function getEmojiSequenceString(sequence: number[], options?: Partial<UnicodeFormattingOptions>): string;
/**
* Merge unicode numbers sequence as icon keyword
*/
declare function emojiSequenceToKeyword(sequence: number[], throwOnError?: boolean): string;
export { UnicodeFormattingOptions, emojiSequenceToKeyword, getEmojiSequenceString, getEmojiUnicodeString };
export { UnicodeFormattingOptions, getEmojiSequenceString, getEmojiUnicodeString };

@@ -7,2 +7,13 @@ /**

* Create optimised regex for emojis
*
* First parameter is array of emojis, entry can be either list of
* code points or emoji sequence as a string
*
* Examples of acceptable strings (case insensitive):
* '1F636 200D 1F32B FE0F' - space separated UTF32 sequence
* '1f636-200d-1f32b-fe0f' - dash separated UTF32 sequence
* 'd83d-de36-200d-d83c-df2b-fe0f' - dash separated UTF16 sequence
* '\\uD83D\\uDE36\\u200D\\uD83C\\uDF2B\\uFE0F' - UTF16 sequence escaped with '\\u'
*
* All examples above refer to the same emoji and will generate the same regex result
*/

@@ -9,0 +20,0 @@ declare function createOptimisedRegex(emojis: (string | number[])[], testData?: number[][]): string;

@@ -35,8 +35,10 @@ export { FullIconCustomisations, IconifyIconCustomisations, IconifyIconSize, IconifyIconSizeCustomisations, defaultIconCustomisations, defaultIconSizeCustomisations } from './customisations/defaults.js';

export { loadIcon } from './loader/loader.js';
export { getEmojiSequenceFromString, joinEmojiSequences, mapEmojiSequences, removeEmojiTones, removeEmojiVariations, splitEmojiSequences } from './emoji/cleanup.js';
export { getEmojiSequenceFromString, getUnqualifiedEmojiSequence, mapEmojiSequences, removeEmojiTones, removeEmojiVariations } from './emoji/cleanup.js';
export { convertEmojiSequenceToUTF16, convertEmojiSequenceToUTF32, getEmojiCodePoint, getEmojiUnicode, isUTF32SplitNumber, mergeUTF32Numbers, splitUTF32Number } from './emoji/convert.js';
export { emojiSequenceToKeyword, getEmojiSequenceString, getEmojiUnicodeString } from './emoji/format.js';
export { parseEmojiTestFile } from './emoji/parse-test.js';
export { addOptionalEmojiVariations } from './emoji/variations.js';
export { getEmojiSequenceString, getEmojiUnicodeString } from './emoji/format.js';
export { getQualifiedEmojiSequencesMap, parseEmojiTestFile } from './emoji/test/parse.js';
export { getQualifiedEmojiVariations } from './emoji/test/variations.js';
export { getEmojisSequencesToCopy } from './emoji/test/copy.js';
export { createOptimisedRegex, createOptimisedRegexForEmojiSequences } from './emoji/regex/create.js';
export { findAndReplaceEmojisInText } from './emoji/replace/replace.js';
export { camelToKebab, camelize, pascalize, snakelize } from './misc/strings.js';

@@ -48,1 +50,2 @@ export { commonObjectProps, compareObjects, unmergeObjects } from './misc/objects.js';

import '@antfu/utils';
import './emoji/replace/find.js';

@@ -6,3 +6,3 @@ {

"author": "Vjacheslav Trushkin",
"version": "2.0.3",
"version": "2.0.4",
"license": "MIT",

@@ -122,2 +122,37 @@ "bugs": "https://github.com/iconify/iconify/issues",

},
"./lib/emoji/replace/find": {
"require": "./lib/emoji/replace/find.cjs",
"import": "./lib/emoji/replace/find.mjs",
"types": "./lib/emoji/replace/find.d.ts"
},
"./lib/emoji/replace/replace": {
"require": "./lib/emoji/replace/replace.cjs",
"import": "./lib/emoji/replace/replace.mjs",
"types": "./lib/emoji/replace/replace.d.ts"
},
"./lib/emoji/test/components": {
"require": "./lib/emoji/test/components.cjs",
"import": "./lib/emoji/test/components.mjs",
"types": "./lib/emoji/test/components.d.ts"
},
"./lib/emoji/test/copy": {
"require": "./lib/emoji/test/copy.cjs",
"import": "./lib/emoji/test/copy.mjs",
"types": "./lib/emoji/test/copy.d.ts"
},
"./lib/emoji/test/name": {
"require": "./lib/emoji/test/name.cjs",
"import": "./lib/emoji/test/name.mjs",
"types": "./lib/emoji/test/name.d.ts"
},
"./lib/emoji/test/parse": {
"require": "./lib/emoji/test/parse.cjs",
"import": "./lib/emoji/test/parse.mjs",
"types": "./lib/emoji/test/parse.d.ts"
},
"./lib/emoji/test/variations": {
"require": "./lib/emoji/test/variations.cjs",
"import": "./lib/emoji/test/variations.mjs",
"types": "./lib/emoji/test/variations.d.ts"
},
"./lib/emoji/cleanup": {

@@ -143,12 +178,2 @@ "require": "./lib/emoji/cleanup.cjs",

},
"./lib/emoji/parse-test": {
"require": "./lib/emoji/parse-test.cjs",
"import": "./lib/emoji/parse-test.mjs",
"types": "./lib/emoji/parse-test.d.ts"
},
"./lib/emoji/variations": {
"require": "./lib/emoji/variations.cjs",
"import": "./lib/emoji/variations.mjs",
"types": "./lib/emoji/variations.d.ts"
},
"./lib/icon-set/convert-info": {

@@ -155,0 +180,0 @@ "require": "./lib/icon-set/convert-info.cjs",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc