
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
angular2-odata
Advanced tools
The project is in an early and untested stage at the moment. The goal is to create a fluent API for querying, creating, updating and deleting OData resources in Angular2. OData service for Angular
##Usage example: Get the package from NPM: npm install angular2-odata
import { ODataConfiguration, ODataServiceFactory } from "angular2-odata";
import { bootstrap } from "angular2/platform/browser";
@Injectable()
class MyODataConfig extends ODataConfiguration{
baseUrl="http://localhost:54872/odata/";
}
bootstrap(app,[
provide(ODataConfiguration, {useClass:MyODataConfig}),
ODataServiceFactory,
]
//An example model interface
interface INotification {
Id: number;
CommentId: number;
Comment: IComment;
FromId: number;
From: IResource;
Priority: number;
SendDate: Date;
IsArchived: boolean;
Text: string;
}
//An example component
@Component({
...
})
export class NotyListComponent{
private odata:ODataService<INotification>;
constructor(private odataFactory:ODataServiceFactory, ...){
this.odata = this.odataFactory.CreateService<INotification>("notification");
}
getOneNoty(id:int){
this.odata.Get(id).Select("Id,Text").Expand("From,To").Exec()
.subscribe(
singleNoty=>{...},
error=>{...}
);
}
getNotys(){
this.odata
.Query() //Creates a query object
.Top(this.top)
.Skip(this.skip)
.Expand("Comment,From")
.OrderBy("SendDate desc")
.Filter(this.filterString)
.Exec() //Fires the request
.subscribe( //Subscribes to Observable<Array<T>>
notys => {
this.notys = notys; //Do something with the result
},
error => {
... //Local error handler
});
}
}
FAQs
OData service for Angular2
The npm package angular2-odata receives a total of 4 weekly downloads. As such, angular2-odata popularity was classified as not popular.
We found that angular2-odata demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.