callmehiphop / backend Goto Github PK
View Code? Open in Web Editor NEWNo API? No problem!
No API? No problem!
Can you please release a new version to npm? Lots of important changes in since v0.3.1.
The latest tagged version of this library for bower : 533e18a : does not include an updated version of the backend.js file that would be used if including it as a standalone.
For some reason, the latest version (0.2.5) in npm does not install with the index.js file so it could load the module.
I think bower.json needs to be updated to point main
to backend.js
.
Instead of packaging a custom build, you can just use the pieces you need from npm, such as https://www.npmjs.com/package/lodash.ismatch
I use browserify for my client side coding and since then I have moved away from using bower and just sticking with npm for installing all dependencies (having one tool is better than 2 tools for managing dependencies). Now the code here is already written in a CommonJS style so I think making this available on NPM should not be terribly hard, I imagine it is just tweaking the package.json file and just testing.
If this is something you think is a good idea and be willing to accept as a PR, I would probably be able to find some time either this weekend or next to give it a go. What do you think?
I know this library is based off of angular's $httpBackend
but one thing I hated with that library was it was not easy to delay responses if you wanted to. I have a modified version of this library that I can create a pull request for but before that I want to make sure your good with the functionality and API of doing this. To delay a response in my modified version of the library, the code looks like this:
backend
.when('GET', '/api/users/1')
.options({
delay: 2000
})
.respond({
name: 'Jake',
species: 'Dog',
magicPowers: true,
location: 'Ooooo'
}, {
'content-type': 'application/json'
});
Do you like this functionality and API for enabling it? If so I will create a pull request.
One of the most powerful features of $httpBackend was the expectGET
family of APIs that would assert that a call would happen and only once. Sure there's no $digest
cycle (thank god) but we can do the assertions on verifyNoOutstandingExpectations
and verifyNoOutstandingRequests
during our test cleanup.
need moar of em
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.