Code Monkey home page Code Monkey logo

short's People

Contributors

bitdeli-chef avatar cbrammer avatar edwardhotchkiss avatar jperkelens avatar lbj96347 avatar lynchseattle avatar matmar10 avatar romanmt avatar t27 avatar thinkroth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

short's Issues

Does this work?

Hi,

I haven' t been able to get this to work.
None of the methods in ShortURL return.

Any ideas?

Npm version outdated

npm shows the older 2.5.2 version, could you please update the package on npm so that using the newer 2.6.0 version is easy

Ability to update data or URL for a given hash

I would really love to have a feature to update the data or URL corresponding to a given hash. the reason being that I don't want to fiddle with the mongo database used by mongoose directly.

I intend to implement it for myself, and would definitely love to push it upstream as well,

The api could be

short.update(hash,{
  URL: '',
  data: ''
}

of course, the URL and data are optional(one might not want to update both), and the new keys in data will add to the existing keys if not present, and update the existing key if the key is already present.

Let me know what you think and if you have any api preferences for this feature

Same URLs should produce same short URL?

Thanks for the helpful library. I'm using short in an app that generates a short URL for the same long URL a few times per long URL. It would be cool if the short URL was the same each time. Obviously I can keep it around, so not a big deal, but it seems like this would be a feature.

Specifying hash has no effect for pre-existing URL

Specifying a hash with a URL that already exists has no effect.

Steps to reproduce

  1. Instantiate step with a mongo connection
  2. Call the generate method and specify a URL to create a short URL document
  3. After the document is saved, create a second short URL document with the hash specified yet using the same URL

Expected behavior

A new document should be created using the provided hash

Actual behavior

The first document is returned with the first auto-generated hash. The specified hash has no effect.

Hash Expiration

Hello there,

I would like to ask if there is a way to automatically delete a record once the specified time is achieved (e.g. expiration is 1 minute [60000ms])? Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.