Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typographic-arrows

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typographic-arrows - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

.babelrc

4

index.js

@@ -1,4 +0,2 @@

'use strict';
module.exports = function (input) {
export default function typographicArrows(input) {
return input

@@ -5,0 +3,0 @@ .replace(/<->/gim, '↔')

{
"name": "typographic-arrows",
"description": "Micro module for real arrows",
"version": "1.0.0",
"version": "1.0.1",
"keywords": [

@@ -12,7 +12,14 @@ "typographic",

"devDependencies": {
"mocha": "^2.2.4"
"ava": "^0.10.0",
"babel-cli": "^6.4.0",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-preset-es2015": "^6.3.13",
"rimraf": "^2.5.0"
},
"main": "index.js",
"main": "index.es5.js",
"scripts": {
"test": "mocha"
"pretest": "npm run prepublish",
"test": "ava",
"prepublish": "babel index.js --out-file index.es5.js",
"postpublish": "rimraf index.es5.js && git push --follow-tags"
},

@@ -19,0 +26,0 @@ "author": "Andrey Polischuk <andre.polischuk@gmail.com>",

@@ -5,3 +5,3 @@ # typographic-arrows [![Build Status][travis-image]][travis-url]

Micro module for real arrows
Micro module for real arrows.

@@ -17,3 +17,4 @@ ## Install

```js
var arrows = require('typographic-arrows');
import arrows from 'typographic-arrows';
arrows('a <- b'); // a ← b

@@ -27,2 +28,12 @@ arrows('a -> b'); // a → b

## API
### arrows(input)
#### input
Type: `string`
Text for transform.
## License

@@ -29,0 +40,0 @@

@@ -1,27 +0,26 @@

'use strict';
var assert = require('assert');
var arrows = require('./');
import test from 'ava';
import arrows from './index.es5';
it('should fix left', function () {
assert(arrows('a <- b') === 'a ← b');
test('should fix left', t => {
t.is(arrows('a <- b'), 'a ← b');
});
it('should fix right', function () {
assert(arrows('a -> b') === 'a → b');
test('should fix right', function (t) {
t.is(arrows('a -> b'), 'a → b');
});
it('should fix left-right', function () {
assert(arrows('a <-> b') === 'a ↔ b');
test('should fix left-right', function (t) {
t.is(arrows('a <-> b'), 'a ↔ b');
});
it('should fix double left', function () {
assert(arrows('a <= b') === 'a ⇐ b');
test('should fix double left', function (t) {
t.is(arrows('a <= b'), 'a ⇐ b');
});
it('should fix double right', function () {
assert(arrows('a => b') === 'a ⇒ b');
test('should fix double right', function (t) {
t.is(arrows('a => b'), 'a ⇒ b');
});
it('should fix double left-right', function () {
assert(arrows('a <=> b') === 'a ⇔ b');
test('should fix double left-right', function (t) {
t.is(arrows('a <=> b'), 'a ⇔ b');
});
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