MCPcopy Index your code
hub / github.com/dotcypress/runes

github.com/dotcypress/runes @0.4.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.4.3 ↗ · + Follow
12 symbols 30 edges 2 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

✂️ Runes

NPM Version Build Status

Unicode-aware JS string splitting with full Emoji support.

Split a string into its constituent characters, without munging emoji and other non-BMP code points.

Why?

The native String#split implementation does not pay attention to surrogate pairs. When the code units of a surrogate pair are split apart, they are not intelligible on their own. Unless they are put back together in the correct order, individual code units will cause problems in code that handles strings.

Installation

$ npm install runes

Example

const runes = require('runes')

// Standard String.split
'♥️'.split('') => ['♥', '️']
'Emoji 🤖'.split('') => ['E', 'm', 'o', 'j', 'i', ' ', '�', '�']
'👩‍👩‍👧‍👦'.split('') => ['�', '�', '‍', '�', '�', '‍', '�', '�', '‍', '�', '�']

// ES6 string iterator
[...'♥️'] => [ '♥', '️' ]
[...'Emoji 🤖'] => [ 'E', 'm', 'o', 'j', 'i', ' ', '🤖' ]
[...'👩‍👩‍👧‍👦'] => [ '👩', '', '👩', '', '👧', '', '👦' ]

// Runes
runes('♥️') => ['♥️']
runes('Emoji 🤖') => ['E', 'm', 'o', 'j', 'i', ' ', '🤖']
runes('👩‍👩‍👧‍👦') => ['👩‍👩‍👧‍👦']

Substring example

const runes = require('runes')

// String.substring
'👨‍👨‍👧‍👧a'.substring(1) => '�‍👨‍👧‍👧a'

// Runes
runes.substr('👨‍👨‍👧‍👧a', 1) => 'a'

Core symbols most depended-on inside this repo

runes
called by 27
index.js
substring
called by 9
index.js
betweenInclusive
called by 5
index.js
isRegionalIndicator
called by 2
index.js
codePointFromSurrogatePair
called by 2
index.js
nextUnits
called by 1
index.js
isFirstOfSurrogatePair
called by 1
index.js
isFitzpatrickModifier
called by 1
index.js

Shape

Function 12

Languages

TypeScript100%

Modules by API surface

index.js12 symbols

For agents

$ claude mcp add runes \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact