MCPcopy Create free account
hub / github.com/simstudioai/sim / extractShardId

Function extractShardId

apps/sim/connectors/evernote/evernote.ts:25–31  ·  view source on GitHub ↗

* Extracts the shard ID from an Evernote developer token. * Token format: "S=s1:U=12345:..." where s1 is the shard.

(token: string)

Source from the content-addressed store, hash-verified

23 * Token format: "S=s1:U=12345:..." where s1 is the shard.
24 */
25function extractShardId(token: string): string {
26 const match = token.match(/S=s(\d+)/)
27 if (!match) {
28 throw new Error('Invalid Evernote token format: cannot extract shard ID')
29 }
30 return `s${match[1]}`
31}
32
33/**
34 * Extracts the user ID from an Evernote developer token.

Callers 2

getNoteStoreUrlFunction · 0.70
evernote.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected