1.0.0 • Published 1 year ago

@hishpr/voluptatem-dolores v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@hishpr/voluptatem-dolores Build status @hishpr/voluptatem-dolores on npm

@hishpr/voluptatem-dolores offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard. It’s based on emoji-test-regex-pattern, which generates (at build time) the regular expression pattern based on the Unicode Standard. As a result, @hishpr/voluptatem-dolores can easily be updated whenever new emoji are added to Unicode.

Installation

Via npm:

npm install @hishpr/voluptatem-dolores

In Node.js:

const emojiRegex = require('@hishpr/voluptatem-dolores');
// Note: because the regular expression has the global flag set, this module
// exports a function that returns the regex rather than exporting the regular
// expression itself, to make it impossible to (accidentally) mutate the
// original regular expression.

const text = `
\u{231A}: ⌚ default emoji presentation character (Emoji_Presentation)
\u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji
\u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base)
\u{1F469}\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier
`;

const regex = emojiRegex();
for (const match of text.matchAll(regex)) {
  const emoji = match[0];
  console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`);
}

Console output:

Matched sequence ⌚ — code points: 1
Matched sequence ⌚ — code points: 1
Matched sequence ↔️ — code points: 2
Matched sequence ↔️ — code points: 2
Matched sequence 👩 — code points: 1
Matched sequence 👩 — code points: 1
Matched sequence 👩🏿 — code points: 2
Matched sequence 👩🏿 — code points: 2

For maintainers

How to update @hishpr/voluptatem-dolores after new Unicode Standard releases

  1. Update emoji-test-regex-pattern as described in its repository.

  2. Bump the emoji-test-regex-pattern dependency to the latest version.

  3. Update the Unicode data dependency in package.json by running the following commands:

    # Example: updating from Unicode v13 to Unicode v14.
    npm uninstall @unicode/unicode-13.0.0
    npm install @unicode/unicode-14.0.0 --save-dev
  4. Generate the new output:

    npm run build
  5. Verify that tests still pass:

    npm test

How to publish a new release

  1. On the main branch, bump the @hishpr/voluptatem-dolores version number in package.json:

    npm version patch -m 'Release v%s'

    Instead of patch, use minor or major as needed.

    Note that this produces a Git commit + tag.

  2. Push the release commit and tag:

    git push && git push --tags

    Our CI then automatically publishes the new release to npm.

Author

twitter/mathias
Mathias Bynens

License

@hishpr/voluptatem-dolores is available under the MIT license.

inimmerspringtraversebiniconvBigInt64ArraytrimEndcharacterrequiresharedarraybufferenvpoint-freeperformantmruowntransportenvironmentsstylesspawnredux-toolkitforEachformattapedynamodbttyfnmatchstringcallbackesUnderscorevpcfastcacheautoprefixerES2015collectionuser-streamstimedescriptorswaapiserializerinstrumentationagentreversefixed-widthjQueryautoscalingiteratefantasy-landstyled-componentssnspreprocessoryupeslintconfigvisualintrinsicqueueeslintpruneconfigwebloggerserverschemaspecwafslicetestsetloadingconvertsetImmediate__proto__Uint16Arrayweakmapeast-asian-widthfastifyisicuzerobuffersbrowserslistArray.prototype.filterclifunctionsURLMapcharactersjsdomchromiumwalkingponyfillrgbArray.prototype.findLastIndextrimRightkeysfastcopypyyamlnodejspushsymbolcreatewarningESnextflatvesthigher-orderansiruntimefssearchyamlreducergroupBybusynopesesextendequalsomeObject.fromEntriesRxvariablesgetterieObjecteventsrm -rftoSorteddateECMAScript 3structuredClonecolorECMAScript 2017core-jsextraexeclintprototypevalidchromeec2protocol-buffersnodeECMAScript 2015joisymbolsmoduleIteratoruuidupquerystringmobilelookobjclassesacornstyleelectronES2021setteridmake dircommanddomcloudtrailmatchesroute53columnscommanderrapidtelephonenegative zerogetoptastECMAScript 5privatebufferArrayBuffer.prototype.slicemergelrues2017typeofemitimmutableArray.prototype.containsfolderinternall10nmoduleshtmlrfc4122flatMapdebuggercoercibledeep-clonePromiserouterglacierhas-ownkey paremrObject.keysbrowserSetsetPrototypeOfbyteassertionunicodeflagsloterror$.extendclassnamesnameinferencetoArrayargumentrssArray.prototype.findLasturlwalkjsxtrimdotenvutilInt16ArrayES2022httpio-tscolorspatchchinesevalidationnamessimpledbcode pointsentriespolyfillcloneprotoString.prototype.matchAlltoolstypedarraysespreeawesomesauceregexpasyncsinatrafilterES5arraybuffermonorepoefficientdatacollection.es6HyBisyntaxerrorvalueamazones-shim APIrangeerrorgetECMAScript 2022ReactiveExtensionsfpsStreamjavascriptconsoleObject.isgenericsfullmocharmbrowserlists3Object.assignreversedArraydeletebyteOffsetescapewritemanagerenvironmentUint8ArrayarraytransformECMAScript 2023whatwgutil.inspectECMAScript 2020validateglobalsflagsbddeverycoveragehardlinkscryptoestreesuperstructpuredeepcloneasterisksdefinePropertyatom0npmignoreshrinkwrapnativelocalJSON-Schemadependency managerutilityBigUint64Arrayjshintartkey valuelanguagearktypecopyEStermmatchAllYAMLrandomjsdiffWebSocketclassnameistanbulimportexportwgetsettingsmapinvariantcensorvarspinonegativestyleguidepluginpostcss-pluginzx.envpopmotionpicomatchoptimistendpointreadablestreamreact posefindupcloudfrontequalitygesturescall-bindqueueMicrotaskES2018qsutilsES8valueskeyrmdircheckStreamsreadableinternal slotreact-testing-librarymanipulationObject.valuesavalengthassertsfromdefinetrimStartparsersameValueZerologserializethreeredactInt8Arraypositivestripchildutilitiesnumberairbnbregexdeep-copyES2023jsonminimalconcatparentscorecolourshebangstoragegatewayArray.prototype.flatMaptypesexecuteglobObservableenderchannelhashrdsprettyECMAScript 2021es7swfreact-hooksRegExp.prototype.flagsWebSocketsrestObject.getPrototypeOfSymbolrecursivefunctionalMicrosoftinspectmkdirpfullwidthclientES2017functionexpressboundmatchdeterministicreusetypefast-copyargsreadtoReversedapollomockingdirectoryxtermloadbalancingdeepcopypnpm9256forkpromisestringifierinstall-0serializationcomputed-typesstableback-endeffect-tses6getPrototypeOfi18nwaitcompareshampropertyelasticachefast-deep-cloneawslook-upmkdirtypedarraylinksortpathkinesisoncepackage managerfile cacheassignoptionapigitignoresharedjsdragmulti-packagemakereduxshellfindmockparentArray.prototype.includesReflect.getPrototypeOfsafefileFunction.prototype.nameUint8ClampedArrayoffsetaccessorparsemomentes2016syntaxES3identifierscall-boundpackage.jsones2015hasposemkdirssqshelperstestingfeedscheme-validationidlesidehandlerhelper[[Prototype]]bundlerajvrouteSymbol.toStringTagxmldiffquotestringifystreamECMAScript 6pipegetOwnPropertyDescriptoraccessibilityes2018globalinstallergdprtaketouchelbdayjsPushisConcatSpreadablecompilerCSSStyleDeclarationregular expressionsArray.prototype.flattenflattenArrayBuffer#sliceform-validation3dsource mapkarmabinariesES2019toolkitreactes-abstractramdaframeworkschemeproxykoreanoutputfindLastIndexprocesstacitcss-in-jsObject.definePropertystreamspostcss_.extenddescriptordebugformsstylingformtypedfile systemguidtypanioncss.gitignoreindicatoriamspinnersservicefigletimportterminalfastclonecontainsArrayBufferclass-validatorroutingoptimizerredirectargvFloat64ArrayprefixpropspinnertypeerrorArray.prototype.flatcharsetpropertiesenumerablecircularObject.entriesdataViewcloudformationTypedArraygroupregular-expressiondeepobjecttypesafeprivate datacommand-lineshimframer@@toStringTaguninstallJSONchaisimple cachelistenersresolvetostringtagTypeScriptObservablesprogressincludesdependenciescallboundcallzodfront-endtoStringTagdom-testing-libraryes8restfulbeanstalkasciiES7ECMAScript 7a11ylibphonenumberstarterasserttypescriptgetintrinsicsymlinkstyped arrayReactiveXhookformfast-deep-copyexpressionfunction.lengthmapreduceignoreomitreal-timedescriptionworkspace:*ebsqueryrules
@dramateas/at-nam-vel-cum@dramateas/magni-explicabo-esse-magnam@dramateas/odit-corporis-adipisci-laboriosam@dramateas/quos-aut-natus-odit@dramateas/recusandae-molestiae-mollitia-modi@hishpr/a-eos-sit-possimus@hishpr/a-nesciunt-iusto-illo@hishpr/adipisci-rerum-repudiandae-eligendi@hishpr/aliquid-repudiandae-voluptate-repellat@hishpr/architecto-dolores-molestiae-at@hishpr/at-itaque-maxime-doloremque@hishpr/deleniti-officiis-quam-sequi@hishpr/dolorum-illum-incidunt-beatae@hishpr/eius-amet-perspiciatis-atque@hishpr/et-debitis-vero-voluptas@hishpr/excepturi-beatae-at-inventore@hishpr/expedita-consequuntur-deleniti-doloribus@hishpr/explicabo-ab-dolor-accusamus@hishpr/fugit-voluptate-commodi-commodi@hishpr/in-beatae-quae-occaecati@hishpr/inventore-necessitatibus-dolorum-nihil@hishpr/ipsum-quibusdam-mollitia-delectus@hishpr/minus-tempore-neque-vel@hishpr/mollitia-sequi-ut-nulla@hishpr/necessitatibus-dicta-molestiae-reprehenderit@hishpr/neque-ullam-voluptatem-unde@hishpr/praesentium-odit-occaecati-repudiandae@hishpr/quidem-harum-alias-natus@hishpr/saepe-tenetur-repellat-facilis@hishpr/vel-nulla-eos-voluptatum@juiggitea/a-laboriosam-omnis-praesentium@juiggitea/distinctio-tempora-quos-quis@juiggitea/nesciunt-ut-culpa-ad@juiggitea/possimus-quos-sint-dolorem@juiggitea/praesentium-porro-voluptates-officiis@juiggitea/quod-voluptatibus-molestias-modi@juiggitea/sapiente-soluta-minima-fuga@juiggitea/ut-nostrum-temporibus-autem@kollusietea/incidunt-veniam-maxime-dicta@kollusietea/neque-officiis-molestias-a@kollusietea/quidem-enim-ad-numquam@kollusietea/saepe-iure-soluta-facilis@kollusietea/voluptate-porro-magnam-et@swenkertrea/esse-provident-minus-nobis@swenkertrea/id-earum-blanditiis-ullam@swenkertrea/iusto-dicta-voluptate-voluptatum@swenkertrea/magni-distinctio-qui-explicabo@swenkertrea/quos-perspiciatis-nobis-quas@swenkertrea/sint-ipsa-delectus-rem@swenkertrea/totam-occaecati-quam-architecto@swenkertrea/ut-illo-aliquid-illum@zittertea/aliquam-asperiores-veritatis-totam@zittertea/dignissimos-harum-sint-alias@zittertea/excepturi-laboriosam-vitae-atque@zittertea/ipsa-nihil-aut-dignissimos@zittertea/pariatur-quis-doloribus-non@zittertea/rerum-totam-officia-laudantium@zittertea/sint-sapiente-maxime-aliquid
1.0.0

1 year ago