建议对JavaScript URL处理库/ API [英] Recommendation for JavaScript URL manipulation library / API
问题描述
什么是你对JavaScript URL处理库/ API推荐
What are your recommendations for JavaScript URL manipulation library / API
具体来说,我想
-
URL中提取出来的参数的URL字符串。理想情况下,将反映到JS对象。
Extract URL parameters out of a URL string. Ideally, would reflect into a JS object.
表单URL参数字符串(最好从一个JS对象)。
Form URL parameter strings (ideally from a JS Object).
推荐答案
我一遍又一遍需要这种。虽然有很多很好的解析器,和许多很好的查询字符串操纵的,我还是发现自己随意通过粘贴拼凑重建的URL。
I've needed this over and over again. Even though there are lots of good parsers, and lots of good query string manipulators, I still found myself haphazardly reconstructing URLs by pasting pieces together.
要搔这个痒,我写了jsUri: HTTP://$c$c.google.com/p/ jsuri 。固体解析,流畅的操作和restringification。尽情享受吧!
To scratch this itch, I wrote jsUri: http://code.google.com/p/jsuri. Solid parsing, fluent manipulation and restringification. Enjoy!
这篇关于建议对JavaScript URL处理库/ API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!