New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@kmdavis/carmen

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kmdavis/carmen - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

.babelrc

93

package.json
{
"name": "@kmdavis/carmen",
"title": "Carmen",
"description": "What in the world is en-US-sandiego?",
"version": "0.1.0",
"homepage": "https://github.com/kmdavis/carmen",
"licenses": [
{
"type": "Apache v2",
"url": "https://github.com/kmdavis/carmen/blob/master/LICENSE"
"name": "@kmdavis/carmen",
"title": "Carmen",
"description": "What in the world is en-US-sandiego?",
"version": "0.2.0",
"homepage": "https://github.com/kmdavis/carmen",
"licenses": "MIT",
"keywords": [
"CHANGE ME"
],
"author": "Kevan Davis <kevan.davis@me.com>",
"repository": "github:kmdavis/carmen.git",
"bugs": "https://github.com/kmdavis/carmen/issues",
"module": "src/index.js",
"main": "dist/index.js",
"devDependencies": {
"@babel/cli": "^7.4.3",
"@babel/core": "^7.4.3",
"@babel/plugin-transform-modules-umd": "^7.2.0",
"@babel/polyfill": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"babel-eslint": "10.0.1",
"babel-plugin-add-header-comment": "^1.0.3",
"chai": "^4.2.0",
"eslint": "^5.16.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.16.0",
"jest": "^24.7.1",
"sinon": "^7.3.1",
"sinon-chai": "^3.3.0"
},
"jest": {
"coveragePathIgnorePatterns": [
"setup_tests.js"
],
"setupFilesAfterEnv": [
"./setup_tests"
],
"transform": {
"^.+\\.js$": "babel-jest"
}
},
"scripts": {
"build": "mkdir -p dist && babel src --out-dir dist && rm -rf dist/__tests__",
"lint": "eslint src",
"test": "jest"
}
],
"keywords": [
"language",
"locale",
"rfc4646"
],
"author": {
"name": "Kevan Davis",
"email": "kevan.davis@me.com"
},
"repository": {
"type": "git",
"url": "git://github.com/kmdavis/carmen.git"
},
"bugs": {
"url": "https://github.com/kmdavis/carmen/issues"
},
"main": "lib/carmen.js",
"devDependencies": {
"grunt": "0.4.x",
"grunt-contrib-clean": "0.5.x",
"grunt-contrib-concat": "0.4.x",
"grunt-contrib-jasmine": "0.6.x",
"grunt-contrib-jshint": "0.10.x",
"grunt-contrib-uglify": "0.5.x",
"grunt-contrib-watch": "0.6.x",
"grunt-coveralls": "0.3.x",
"grunt-karma": "0.8.x",
"grunt-release": "0.7.x",
"grunt-replace": "0.7.x",
"groc": "0.6.x",
"karma-coverage": "0.2.x",
"karma-jasmine": "0.2.x",
"karma-requirejs": "0.2.x",
"karma-phantomjs-launcher": "0.1.x"
},
"scripts": {
"test": "grunt test"
}
}
# Carmen
###### What in the world is en-US-sandiego?
[![Build Status](https://api.travis-ci.org/kmdavis/carmen.png?branch=master)](https://travis-ci.org/kmdavis/carmen)
[![Coverage Status](https://coveralls.io/repos/kmdavis/carmen/badge.png)](https://coveralls.io/r/kmdavis/carmen)
[![Dev Dependencies](https://david-dm.org/kmdavis/carmen/dev-status.svg)](https://david-dm.org/kmdavis/carmen#dev-badge-embed)
> What in the world is en-US-sandiego?
Usage
=====
[![NPM Version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Downloads Stats][npm-downloads]][npm-url]
Carmen.js is, in a nutshell, a [RFC-4646](http://tools.ietf.org/html/rfc4646) &
[RFC-5646](http://tools.ietf.org/html/rfc5646) parser. In other words, Carmen
will parse strings like 'en-US-sandiego' and tell you that it refers to the
will parse strings like "en-US-sandiego" and tell you that it refers to the
english language, in the United States, specifically, the variant spoken in
San Diego.
## Installation
```sh
npm install @kmdavis/carmen
```
## Usage
```js
carmen.parse('en-US');
import carmen from "@kmdavis/carmen";
carmen("en-US");
```

@@ -22,5 +29,5 @@ will return

{
text: 'en-US',
language: 'en',
region: 'US'
text: "en-US",
language: "en",
region: "US",
}

@@ -30,3 +37,3 @@ ```

```js
carmen.parse('sl-Latn-IT-nedis');
carmen("sl-Latn-IT-nedis");
```

@@ -36,7 +43,7 @@ will return

{
text: 'sl-Latn-IT-nedis',
language: 'sl',
script: 'Latn',
region: 'IT',
variants: ['nedis']
text: "sl-Latn-IT-nedis",
language: "sl",
script: "Latn'"
region: "IT",
variants: ["nedis"],
}

@@ -50,3 +57,3 @@ ```

language: String,
extlang: [String],
extlangs: [String],
script: String,

@@ -66,25 +73,37 @@ region: String,

Contributing
============
## Development setup
We use grunt for running tests and such, so, if you want to contribute, you'll
want to install grunt's cli `sudo npm install -g grunt-cli`. Once you have done
so, you can run any of our grunt tasks: `grunt watch`, `grunt test`, `grunt build`,
`grunt release:(major or minor or patch)`
```sh
npm install
npm test
```
License
=======
## Release History
Copyright 2014 Kevan Davis.
* 0.1.0
* Initial public release
* 0.2.0
* Rewrite using modern javascript
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
## Meta
http://www.apache.org/licenses/LICENSE-2.0
Kevan Davis <kevan.davis@me.com>
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Distributed under the MIT license.
[https://github.com/kmdavis/carmen](https://github.com/kmdavis/carmen/)
## Contributing
1. Fork it (<https://github.com/kmdavis/carmen/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request
<!-- Markdown link & img dfn's -->
[npm-image]: https://img.shields.io/npm/v/@kmdavis/carmen.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@kmdavis/carmen
[npm-downloads]: https://img.shields.io/npm/dm/@kmdavis/carmen.svg?style=flat-square
[travis-image]: https://img.shields.io/travis/kmdavis/carmen/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/kmdavis/carmen

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc