npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cree-sro-syllabics

v2021.6.8

Published

Convert Western Cree SRO to syllabics

Downloads

20

Readme

Cree SRO/Syllabics

Unit test status codecov npm version calver YYYY.MM.DD

Convert between Western Cree standard Roman orthography (SRO) and syllabics!

This is a port of the Python library of the same name. For more complete documentation, see the Python version's documentation.

Install

Browser

Copy cree-sro-syllabics.js to wherever is most convenient. Then, include it in your HTML like this:

<script src="/path/to/cree-sro-syllabics.js" charset="UTF-8"></script>

Make sure to provide charset="UTF-8"! The browser may attempt to read the file in an alternate encoding, and the converter will no longer work as expected.

When loaded in the browser, you can access all functions using the CreeSROSyllabics global:

<script src="/path/to/cree-sro-syllabics.js" charset="UTF-8"></script>
<script>
console.log(CreeSROSyllabics.sro2syllabics("tân'si")) // logs "ᑕᓂᓯ"
</script>

NodeJS

Install using npm:

npm install cree-sro-syllabics --save

Then require() it into your code:

var CreeSROSyllabics = require('cree-sro-syllabics')

console.log(CreeSROSyllabics.sro2syllabics("tân'si")) // logs ᑖᓂᓯ

Usage

There are two primary functions: sro2syllabics() and syllabics2sro(). There is also the version constant.

sro2syllabics()

sro2Syllabics(sroString: string, options = {}): string

Convert text in SRO to syllabics.

CreeSROSyllabics.sro2syllabics("tân'si")
// returns "ᑕᓂᓯ"

options, if supplied, is an object containing the following options:

options.hyphens

What character to use as hyphens. Defaults to U+202F NARROW NO-BREAK SPACE—a space that is narrower than a word separating space; line breaks are not permitted at this space.

Using a normal space character:

CreeSROSyllabics.sro2syllabics('kâ-mahihkani-pimohtêt', { hyphens: ' ' })

ᑳ ᒪᐦᐃᐦᑲᓂ ᐱᒧᐦᑌᐟ

Using the default:

CreeSROSyllabics.sro2syllabics('kâ-mahihkani-pimohtêt')

ᑳ ᒪᐦᐃᐦᑲᓂ ᐱᒧᐦᑌᐟ

options.finalHK

What character use as the word-final “hk” (e.g., in locatives and certain conjunct mode verb forms). Use either "x" (default) or "hk".

The default is to use the «ᕽ» syllabic:

CreeSROSyllabics.sro2syllabics('sâwanohk')

ᓵᐘᓄᕽ

This is equivalent to providing { finalHK: "x" }:

CreeSROSyllabics.sro2syllabics('sâwanohk', { finalHK: "x" })

ᓵᐘᓄᕽ

However, some communities (like Maskwacîs) do not use the «ᕽ» syllabic, instead using «ᐦᐠ». You can specify { finalHK: "hk" } to get this behaviour instead:

CreeSROSyllabics.sro2syllabics('sâwanohk', { finalHK: "hk" })

ᓵᐘᓄᐦᐠ

syllabics2sro()

syllabics2sro(syllabicsString: string, options = {}): string

Convert text in syllabics to SRO.

CreeSROSyllabics.syllabics2sro('ᑖᓂᓯ')
// returns "tân'si"

options, if supplied, is an object containing the following options:

options.longAccents

Whether to produce circumflexes (âêîô) or macrons (āēīō) when transliterating long vowels.

Valid options:

  • 'circumflexes' (default)
  • 'macrons'

Specifying 'macrons':

CreeSROSyllabics.syllabics2sro("ᑖᓂᓯ", { longAccents: 'macrons' })

tānisi

Using the defaults (circumflexes):

CreeSROSyllabics.syllabics2sro("ᑖᓂᓯ")

tânisi

version

The module's current version, as a string.

License

Copyright © 2018–2021 National Research Council Canada.

Licensed under the MIT license.