Permalink
Browse files

Update dependencies

  • Loading branch information...
mathiasbynens committed Jan 26, 2015
1 parent 2660255 commit 0db670ac25b11d811d4e8de522ee18d8af72e557
Showing with 44 additions and 49 deletions.
  1. +2 −2 .gitignore
  2. +5 −4 .travis.yml
  3. +7 −4 Gruntfile.js
  4. +1 −1 LICENSE-MIT.txt
  5. +9 −9 README.md
  6. +1 −1 bin/esrever
  7. +2 −2 esrever.js
  8. +2 −2 man/esrever.1
  9. +13 −20 package.json
  10. +0 −2 scripts/export-data.js
  11. +2 −2 src/esrever.js
View
@@ -1,5 +1,5 @@
# JSON version of coverage report
coverage/coverage.json
# Coverage report
coverage
# Installed npm modules
node_modules
View
@@ -1,19 +1,20 @@
language: node_js
node_js:
- "0.10"
- "0.8"
before_script:
- "npm install -g grunt-cli"
# Narwhal uses a hardcoded path to openjdk v6, so use that version
- "sudo apt-get update -qq"
- "sudo apt-get install -qq openjdk-6-jre"
- "PACKAGE=rhino1_7R3; wget http://ftp.mozilla.org/pub/mozilla.org/js/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=rhino1_7R3; echo -e '#!/bin/sh\\njava -jar /opt/'$PACKAGE'/js.jar $@' | sudo tee /usr/local/bin/rhino && sudo chmod +x /usr/local/bin/rhino"
- "PACKAGE=ringojs-0.9; wget http://ringojs.org/downloads/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=ringojs-0.9; sudo ln -s /opt/$PACKAGE/bin/ringo /usr/local/bin/ringo && sudo chmod +x /usr/local/bin/ringo"
- "PACKAGE=ringojs-0.11; wget https://github.com/ringo/ringojs/releases/download/v0.11.0/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=ringojs-0.11; sudo ln -s /opt/$PACKAGE/bin/ringo /usr/local/bin/ringo && sudo chmod +x /usr/local/bin/ringo"
- "PACKAGE=v0.3.2; wget https://github.com/280north/narwhal/archive/$PACKAGE.zip && sudo unzip $PACKAGE -d /opt/ && rm $PACKAGE.zip"
- "PACKAGE=narwhal-0.3.2; sudo ln -s /opt/$PACKAGE/bin/narwhal /usr/local/bin/narwhal && sudo chmod +x /usr/local/bin/narwhal"
# If the enviroment stores rt.jar in a different directory, find it and symlink the directory
- "PREFIX=/usr/lib/jvm; if [ ! -d $PREFIX/java-6-openjdk ]; then for d in $PREFIX/java-6-openjdk-*; do if [ -e $d/jre/lib/rt.jar ]; then sudo ln -s $d $PREFIX/java-6-openjdk; break; fi; done; fi"
script:
"grunt travis"
- "grunt ci"
after_script:
- "grunt shell:cover-coveralls"
View
@@ -7,9 +7,12 @@ module.exports = function(grunt) {
'stderr': true,
'failOnError': true
},
'cover': {
'cover-html': {
'command': 'istanbul cover --report "html" --verbose --dir "coverage" "tests/tests.js"'
},
'cover-coveralls': {
'command': 'istanbul cover --verbose --dir "coverage" "tests/tests.js" && cat coverage/lcov.info | coveralls; rm -rf coverage/lcov*'
},
'test-narwhal': {
'command': 'echo "Testing in Narwhal..."; export NARWHAL_OPTIMIZATION=-1; narwhal "tests/tests.js"'
},
@@ -55,16 +58,16 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-template');
grunt.loadNpmTasks('grunt-shell');
grunt.registerTask('cover', 'shell:cover');
grunt.registerTask('travis', [
grunt.registerTask('cover', 'shell:cover-html');
grunt.registerTask('ci', [
'shell:test-narwhal',
'shell:test-phantomjs',
'shell:test-rhino',
'shell:test-ringo',
'shell:test-node',
]);
grunt.registerTask('test', [
'travis',
'ci',
'shell:test-browser'
]);
View
@@ -1,4 +1,4 @@
Copyright Mathias Bynens <http://mathiasbynens.be/>
Copyright Mathias Bynens <https://mathiasbynens.be/>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
@@ -1,6 +1,6 @@
# Esrever [![Build status](https://travis-ci.org/mathiasbynens/esrever.svg?branch=master)](https://travis-ci.org/mathiasbynens/esrever) [![Dependency status](https://gemnasium.com/mathiasbynens/esrever.svg)](https://gemnasium.com/mathiasbynens/esrever)
# Esrever [![Build status](https://travis-ci.org/mathiasbynens/esrever.svg?branch=master)](https://travis-ci.org/mathiasbynens/esrever) [![Code coverage status](https://coveralls.io/repos/mathiasbynens/esrever/badge.svg)](https://coveralls.io/r/mathiasbynens/esrever) [![Dependency status](https://gemnasium.com/mathiasbynens/esrever.svg)](https://gemnasium.com/mathiasbynens/esrever)
_Esrever_ is a Unicode-aware string reverser written in JavaScript. It allows you to easily reverse any string of Unicode symbols, while handling combining marks and astral symbols just fine. [Here’s an online demo.](http://mothereff.in/reverse-string)
_Esrever_ is a Unicode-aware string reverser written in JavaScript. It allows you to easily reverse any string of Unicode symbols, while handling combining marks and astral symbols just fine. [Here’s an online demo.](https://mothereff.in/reverse-string)
## Why not just use `string.split('').reverse().join('')`?
@@ -21,7 +21,7 @@ naiveReverse('foo 𝌆 bar');
// Where did the `𝌆` symbol go? Whoops!
```
If you’re wondering why this happens, [read up on JavaScript’s internal character encoding](http://mathiasbynens.be/notes/javascript-encoding).
If you’re wondering why this happens, [read up on JavaScript’s internal character encoding](https://mathiasbynens.be/notes/javascript-encoding).
But there’s more:
@@ -40,7 +40,7 @@ And indeed: by swapping the position of any combining marks with the symbol they
## Installation
Via [npm](http://npmjs.org/):
Via [npm](https://www.npmjs.com/):
```bash
npm install esrever
@@ -64,7 +64,7 @@ In a browser:
<script src="esrever.js"></script>
```
In [Narwhal](http://narwhaljs.org/), [Node.js](http://nodejs.org/), and [RingoJS](http://ringojs.org/):
In [Narwhal](http://narwhaljs.org/), [Node.js](https://nodejs.org/), and [RingoJS](http://ringojs.org/):
```js
var esrever = require('esrever');
@@ -163,22 +163,22 @@ See `esrever --help` for the full list of options.
## Support
Esrever has been tested in at least Chrome 27-29, Firefox 3-22, Safari 4-6, Opera 10-12, IE 6-10, Node.js v0.10.0, Narwhal 0.3.2, RingoJS 0.8-0.9, PhantomJS 1.9.0, and Rhino 1.7RC4.
Esrever has been tested in at least Chrome 27-29, Firefox 3-22, Safari 4-6, Opera 10-12, IE 6-10, Node.js v0.10.0, io.js v1.0.0, Narwhal 0.3.2, RingoJS 0.8-0.11, PhantomJS 1.9.0, and Rhino 1.7RC4.
## Unit tests & code coverage
After cloning this repository, run `npm install` to install the dependencies needed for Esrever development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`.
Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, and web browsers as well, use `grunt test`.
To generate [the code coverage report](http://rawgithub.com/mathiasbynens/esrever/master/coverage/esrever/esrever.js.html), use `grunt cover`.
To generate the code coverage report, use `grunt cover`.
## Author
| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
|---|
| [Mathias Bynens](http://mathiasbynens.be/) |
| [Mathias Bynens](https://mathiasbynens.be/) |
## License
Esrever is available under the [MIT](http://mths.be/mit) license.
Esrever is available under the [MIT](https://mths.be/mit) license.
View
@@ -15,7 +15,7 @@
var main = function() {
if (/^(?:-h|--help)$/.test(option) || option == null && !strings.length) {
log('esrever v%s - http://mths.be/esrever', esrever.version);
log('esrever v%s - https://mths.be/esrever', esrever.version);
log('\nUsage:\n');
log('\tesrever [string ...]');
log('\tesrever [-f | --file] [file ...]');
View
@@ -1,4 +1,4 @@
/*! http://mths.be/esrever v0.1.0 by @mathias */
/*! https://mths.be/esrever v0.1.0 by @mathias */
;(function(root) {
// Detect free variables `exports`
@@ -17,7 +17,7 @@
/*--------------------------------------------------------------------------*/
var regexSymbolWithCombiningMarks = /([\0-\u02FF\u0370-\u1DBF\u1E00-\u20CF\u2100-\uD7FF\uDC00-\uFE1F\uFE30-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF])([\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]+)/g;
var regexSymbolWithCombiningMarks = /([\0-\u02FF\u0370-\u1AAF\u1B00-\u1DBF\u1E00-\u20CF\u2100-\uD7FF\uE000-\uFE1F\uFE30-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])([\u0300-\u036F\u1AB0-\u1AFF\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]+)/g;
var regexSurrogatePair = /([\uD800-\uDBFF])([\uDC00-\uDFFF])/g;
var reverse = function(string) {
View
@@ -67,6 +67,6 @@ Print the reversed version of the string that gets piped in.
.Sh BUGS
esrever's bug tracker is located at <https://github.com/mathiasbynens/esrever/issues>.
.Sh AUTHOR
Mathias Bynens <http://mathiasbynens.be/>
Mathias Bynens <https://mathiasbynens.be/>
.Sh WWW
<http://mths.be/esrever>
<https://mths.be/esrever>
View
@@ -2,7 +2,7 @@
"name": "esrever",
"version": "0.1.0",
"description": "A fully Unicode-aware string reverser written in JavaScript.",
"homepage": "http://mths.be/esrever",
"homepage": "https://mths.be/esrever",
"main": "esrever.js",
"bin": "bin/esrever",
"man": "man/esrever.1",
@@ -11,23 +11,16 @@
"reverse",
"unicode"
],
"licenses": [
{
"type": "MIT",
"url": "http://mths.be/mit"
}
],
"license": "MIT",
"author": {
"name": "Mathias Bynens",
"url": "http://mathiasbynens.be/"
"url": "https://mathiasbynens.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/mathiasbynens/esrever.git"
},
"bugs": {
"url": "https://github.com/mathiasbynens/esrever/issues"
},
"bugs": "https://github.com/mathiasbynens/esrever/issues",
"files": [
"LICENSE-MIT.txt",
"esrever.js",
@@ -42,16 +35,16 @@
"scripts": {
"test": "node tests/tests.js"
},
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.4",
"grunt-shell": "~0.6.4",
"grunt-template": "~0.2.3",
"istanbul": "~0.2.7",
"qunit-extras": "~1.0.0",
"coveralls": "^2.11.2",
"grunt": "^0.4.5",
"grunt-shell": "^1.1.1",
"grunt-template": "^0.2.3",
"istanbul": "^0.3.5",
"qunit-extras": "^1.4.1",
"qunitjs": "~1.11.0",
"regenerate": "~0.6.0",
"requirejs": "~2.1.11",
"unicode-6.3.0": "~0.1.2"
"regenerate": "^1.1.0",
"requirejs": "^2.1.15",
"unicode-7.0.0": "^0.1.5"
}
}
View
@@ -26,7 +26,5 @@ var allExceptCombiningMarks = regenerate()
module.exports = {
'combiningMarks': combiningMarks.toString(),
'allExceptCombiningMarks': allExceptCombiningMarks.toString(),
'highSurrogates': regenerate().addRange(0xD800, 0xDBFF).toString(),
'lowSurrogates': regenerate().addRange(0xDC00, 0xDFFF).toString(),
'version': packageInfo.version
};
View
@@ -1,4 +1,4 @@
/*! http://mths.be/esrever v<%= version %> by @mathias */
/*! https://mths.be/esrever v<%= version %> by @mathias */
;(function(root) {
// Detect free variables `exports`
@@ -18,7 +18,7 @@
/*--------------------------------------------------------------------------*/
var regexSymbolWithCombiningMarks = /(<%= allExceptCombiningMarks %>)(<%= combiningMarks %>+)/g;
var regexSurrogatePair = /(<%= highSurrogates %>)(<%= lowSurrogates %>)/g;
var regexSurrogatePair = /([\uD800-\uDBFF])([\uDC00-\uDFFF])/g;
var reverse = function(string) {
// Step 1: deal with combining marks and astral symbols (surrogate pairs)

0 comments on commit 0db670a

Please sign in to comment.