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

anye

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anye - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

14

lib/anye.js

@@ -12,4 +12,4 @@

"use strict";
var QS, oAnye, oDataStore, rMatchURLParam, _clear, _count, _generate, _get, _set,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
var QS, _clear, _count, _generate, _get, _set, oAnye, oDataStore, rMatchURLParam,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

@@ -39,8 +39,8 @@ QS = require("qs");

_generate = function(sURL, oParams, bDecode) {
var aMatches, mValue, oAdditionalParams, sMatch, sParam, sQueryString, _i, _len, _ref, _ref1;
if (!(aMatches = (_ref = sURL.match(rMatchURLParam)) != null ? _ref : [])) {
var aMatches, i, len, mValue, oAdditionalParams, ref, ref1, sMatch, sParam, sQueryString;
if (!(aMatches = (ref = sURL.match(rMatchURLParam)) != null ? ref : [])) {
return sURL;
}
for (_i = 0, _len = aMatches.length; _i < _len; _i++) {
sMatch = aMatches[_i];
for (i = 0, len = aMatches.length; i < len; i++) {
sMatch = aMatches[i];
if (!(mValue = oParams[sMatch.slice(1)])) {

@@ -54,3 +54,3 @@ throw new Error("Undefined param '" + sMatch + "'!");

mValue = oParams[sParam];
if (_ref1 = ":" + sParam, __indexOf.call(aMatches, _ref1) < 0) {
if (ref1 = ":" + sParam, indexOf.call(aMatches, ref1) < 0) {
oAdditionalParams[sParam] = mValue;

@@ -57,0 +57,0 @@ }

{
"name": "anye",
"version": "0.4.1",
"version": "0.4.2",
"description": "Server-agnostic named URL builder for node.js",

@@ -45,7 +45,7 @@ "keywords": [

"devDependencies": {
"coffeelint": "^1.6.0",
"coffeelint": "^1.11.1",
"grunt": "^0.4.5",
"grunt-clear": "^0.2.1",
"grunt-coffeelint": "0.0.13",
"grunt-contrib-coffee": "^0.12.0",
"grunt-contrib-coffee": "^0.13.0",
"grunt-contrib-nodeunit": "^0.4.1",

@@ -56,4 +56,4 @@ "grunt-contrib-watch": "^0.6.1",

"dependencies": {
"qs": "^2.2.4"
"qs": "^5.0.0"
}
}

@@ -36,3 +36,3 @@ # anyè

**Note:** the `set` method returns the stored URL, so you can use it directly in your route definition like in express: `app.post( Anye.set( "name", "/url/:id" ), routeHandler );`
**Note:** the `set` method returns the stored URL, so you can use it directly in your route definition like in express: `app.post( Anye.set( "name", "/url/:id" ), routeHandler );`

@@ -86,3 +86,3 @@ ##### Aliases

```javascript
Anye.get( sURL, oParams, bDecode )
Anye.generate( sURL, oParams, bDecode )
```

@@ -130,4 +130,4 @@

* **2014-10-07:** version `0.4.0`, add aliases, add `generate` method
* **2014-10-06:** version `0.3.0`, returned URLs are encoded by default
* **2014-10-07:** version `0.4.0`, add aliases, add `generate` method.
* **2014-10-06:** version `0.3.0`, returned URLs are encoded by default.
* **2014-10-06:** version `0.2.0`, add query-string population with additional parameters.

@@ -134,0 +134,0 @@ * **2014-10-05:** version `0.1.0`, initial release.

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