Gathering detailed insights and metrics for ng-custom-pipe
Gathering detailed insights and metrics for ng-custom-pipe
npm install ng-custom-pipe
Typescript
Module System
Node Version
NPM Version
Total Downloads
2,289
Last Day
2
Last Week
33
Last Month
58
Last Year
1,633
Minified
Minified + Gzipped
Latest Version
1.2.1
Package Id
ng-custom-pipe@1.2.1
Unpacked Size
1.17 MB
Size
511.94 kB
File Count
171
NPM Version
6.14.17
Node Version
14.21.1
Publised On
23 Aug 2023
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
200%
33
Compared to previous week
Last month
34.9%
58
Compared to previous month
Last year
148.9%
1,633
Compared to previous year
1
2
/** Copyright 2023 Infosys Ltd. */
Input: I am invincible
Output: I AM INVINCIBLE
#Convert a string to Uppercase.
Input: I AM A PORSCHE with NO BREAK
Output: i am a porsche with no break
#Convert a string to Lowercase.
Input: 45a
Output: 45a #Notice the spacing
#'left' is an Optional Direction. Default is 'around'. Other permissible values are 'left', 'right', 'start', 'end' and 'around'.
Input: 45a 67b
Output: 45a,67b
#' ' is an Optional Separator. Default is ''.
Input: Here should be replaced by There
Output: There should be replaced by There
#'There' is Optional Replaced String. Default is 'Default Text'.
Input: We have to get the first occurrence of the matching sub strings in the string. Matching string should be the[case insensitive]
Output: 15
#'the' represents the text which shall be available in the string. It returns the index of first occurence.
Input: '121212121212'
Output: XXXXXXXXXXXX
Input: '121212121212'
Output: XXXXXXXX1212
Input: '121212121212'
Output: 1212XXXXXXXX
#This pipe returns the masked value of a string. 8 and 'left' or 'right' is optional arguements. 8 is the number of charaters to be masked. By default, it's same as input length. Second arguement represents diretion of masking(from left/right). By default, it's 'right'.
Input: 'rajneeshKumar, petchiKannan and akshayShinde are the developer-of-this_library.'
Output: Rajneesh Kumar, Petchi Kannan And Akshay Shinde Are The Developer Of This Library.
#This pipe returns the well organized sentance formed after capitalizing first letter of each word, replacing - or _ with spaces and by separating camelCases and PascalCases.
Input: We have to cApitalize this string.
Output: We Have To Capitalize This String.
#It Makes The First Letter Of Each Word in a String Capital.
Input: We have to slug this string.
Output: we-have-to-slug-this-string-
#This pipe replaces spaces and special characters with hyphens.
Input: string to reverse
Output: esrever ot gnirts
#This pipe reverses the input string.
Input: string to repeat
Output: string to repeat-string to repeat-string to repeat-string to repeat-string to repeat
#This pipe repeats the string for n times joined by separator. 5 is optional count and '-' is optional separator. Default count is 1 and default separator is ''.
Input: I want to {0} these {1} using {2} pipe.
Output: I want to populate these strings using interpolate pipe.
#This pipe reverses the input string.
Input: string to truncate after 15 digits
Output: string to trunc- - -
#This pipe truncates the input string to given number of characters with provided delimiter. Default numer is half of the string's length and default delimiter is '...'.
Input: şᵵᵲᶖnɡ to delaᵵᶖnᶖze
Output: string to delatinize
#This pipe de-latinize the input string.
Input: [ {name: 'Adam', prof: 'Teacher'}, {name: 'Brian', prof: 'Housekeeper'}, {name: 'Chloe', prof: 'Teacher'}, {name: 'Daren', prof: 'Gardener'} ]
Output: [{"key":"Teacher","value":[{"name":"Adam","prof":"Teacher"},{"name":"Chloe","prof":"Teacher"}]},{"key":"Housekeeper","value":[{"name":"Brian","prof":"Housekeeper"}]},{"key":"Gardener","value":[{"name":"Daren","prof":"Gardener"}]}]
'prof' column represents column to be used for grouping. Additionally, stringify pipe has been used to render data after converting it from Object to String.
Input: [3, 5, 7, 12, 5]
Output: 6.4
#This pipe strictly asks for an array of number as input, and returns a number as average of all the values of array.
Input: [3, 5, 7, 12, 5]
Output: 5
#This pipe strictly asks for an array of number as input, and returns a number as median of all the values of array.
Input: [3, 5, 7, 12, 5]
Output: 5
#This pipe strictly asks for an array of number as input, and returns a number as mode of all the values of array.
Input: [3, 5, 7, 12, 5]
Output: 3
#This pipe strictly asks for an array of number as input, and returns a number as minimum of all the values of array.
Input: [3, 5, 7, 12, 5]
Output: 12
#This pipe strictly asks for an array of number as input, and returns a number as maximum of all the values of array.
Input: [3, 5, 7, 12, 5]
Output: 32
#This pipe strictly asks for an array of number as input, and returns a number as sum of all the values of array.
Input: []
Output: true
Input: [3, 5, 7, 12, 5]
Output: false
#This pipe returns a boolean denoting the empty state of any array.
Input: [3, 5, 7, "12", 5]
Output: 3
#This pipe takes an array as input, and returns the first element of the array.
Input: [3, 5, 7, "12", 5]
Output: 5
#This pipe takes an array as input, and returns the last element of the array.
Input: [3, 5, 7, "12", 5]
Output: [5,7,"12",5]
#This pipe takes an array as input, and returns the array without first element of the array.
Input: [3, 5, 7, "12", 5]
Output: [3,5,7,"12"]
#This pipe takes an array as input, and returns the array without last element of the array.
Input: ["Devil", "was", "at age of", "12", "When he joined the ", "."]
Output: DevilCoderswasCodersat age ofCoders12CodersWhen he joined the Coders.
#This pipe takes an array of string as input, and returns a string joining the array with the provided joiner. 'Coders' is an optional joiner. Default is ''.
Input: [3, 5, 7, "12", 5]
Output: [3,5,7,"12",5,5,"Ram"]
#This pipe reverses the input string.
Input: [3, 5, 7, "12", 5]
Output: [3,5,7,"12"]
#This pipe takes an array as input, and returns an array with unique elements of the array.
Input: [3, 5, 7, "12", 5]
Output: [3,7]
Input: [3, 5, 7, "12", 5]
Output: [3,7,"12"]
Input: [3, 5, 7, "12", 5]
Output: [3,5,7,5]
#This pipe takes an array/string/number as input, and returns an array without mentioned elements of the array.
Input: [3, 5, 7, "12", 5]
Output: [5,"12"]
#This pipe takes an array as input, and returns an intersection with mentioned array[No duplicates in result].
Input: [3, 5, 7, "12", 5]
Output: [3,5,7,"12",1,"Ram"]
#This pipe takes an array as input, and returns a union with mentioned array[No duplicates in result].
Input: [3, 5, 7, 12, 5, 107]
Output: [5,7,12,5]
#This pipe takes an array of number as input, and returns an array with all the elements in provided range[both inclusive]. Both start[5] and end[50] values are optional, it takes minimum and maximum value of the array respectively, if ommitted.
Input: [3, 5, 7, 12, 5, 107]
Output: [6,10,14,24,10,214]
#This pipe takes an array of number as input, and returns an array after performing function operation on it.
Input: [ {name: 'Alex', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '111122223333', pan: 'ABCDE1234F'}}}, {name: 'Ben', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '222233334444', pan: 'GHIJ1234K'}}}, {name: 'Ceth', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '333344445555', pan: 'LMNO1234P'}}} ]
Output: ["111122223333","222233334444","333344445555"]
#This pipe takes an array of number as input, and returns an array of mentioned key from it.
Input: [3, 5, 7, 12, 5, 107]
Output: [5,5]
Input: ["3", 5, 7, "12", 5, 107]
Output: ["12"]
Input: [ {name: 'Alex', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '111122223333', pan: 'ABCDE1234F'}}}, {name: 'Ben', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '222233334444', pan: 'GHIJ1234K'}}}, {name: 'Ceth', details: {official: {designation: 'Tester', organization: 'AB CORP.'}, personal: {aadhar: '333344445555', pan: 'LMNO1234P'}}} ]
Output: [{"name":"Alex","details":{"official":{"designation":"Coder","organization":"AB CORP."},"personal":{"aadhar":"111122223333","pan":"ABCDE1234F"}}},{"name":"Ben","details":{"official":{"designation":"Coder","organization":"AB CORP."},"personal":{"aadhar":"222233334444","pan":"GHIJ1234K"}}}]
Input: [ {name: 'Alex', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '111122223333', pan: 'ABCDE1234F'}}}, {name: 'Ben', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '222233334444', pan: 'GHIJ1234K'}}}, {name: 'Ceth', details: {official: {designation: 'Tester', organization: 'AB CORP.'}, personal: {aadhar: '333344445555', pan: 'LMNO1234P'}}} ]
Output: [{"name":"Alex","details":{"official":{"designation":"Coder","organization":"AB CORP."},"personal":{"aadhar":"111122223333","pan":"ABCDE1234F"}}}]
#This pipe takes an array as input, and returns a filtered array according to parameterized value/function.
Input: [3, 5, 7, 12, 5, 107]
Output: 5
Input: ["3", 5, 7, "12", 5, 107]
Output: "12"
Input: [ {name: 'Alex', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '111122223333', pan: 'ABCDE1234F'}}}, {name: 'Ben', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '222233334444', pan: 'GHIJ1234K'}}}, {name: 'Ceth', details: {official: {designation: 'Tester', organization: 'AB CORP.'}, personal: {aadhar: '333344445555', pan: 'LMNO1234P'}}} ]
Output: {"name":"Alex","details":{"official":{"designation":"Coder","organization":"AB CORP."},"personal":{"aadhar":"111122223333","pan":"ABCDE1234F"}}}
Input: [ {name: 'Alex', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '111122223333', pan: 'ABCDE1234F'}}}, {name: 'Ben', details: {official: {designation: 'Coder', organization: 'AB CORP.'}, personal: {aadhar: '222233334444', pan: 'GHIJ1234K'}}}, {name: 'Ceth', details: {official: {designation: 'Tester', organization: 'AB CORP.'}, personal: {aadhar: '333344445555', pan: 'LMNO1234P'}}} ]
Output: {"name":"Alex","details":{"official":{"designation":"Coder","organization":"AB CORP."},"personal":{"aadhar":"111122223333","pan":"ABCDE1234F"}}}
#This pipe takes an array as input, and returns only one element according to parameterized value/function.
Input: [3, 5, 7, 12, 5, 107]
Output: [107,12,7,5,5,3]
#This pipe takes an array as input, and returns sorted array. 'desc' is optional sorting method parameter. Default is 'asc'.
Input: [3, 5, 7, 12, 5, 107]
Output: [107,5,12,7,5,3]
#This pipe takes an array as input, and returns reversed array.
Input: [3, 5, 7, 12, 5, 107]
Output: 6
#This pipe takes an array as input, and returns its length.
Input: [3, 5, 7, 12, 5, 107, "Glamour"]
Output: [[3,5,7],[12,5,107],["Glamour"]]
#This pipe takes an array as input, and returns an array containing smaller arrays of given length. 3 is an optional length parameter. Default is 1.
Input: [3, 5, 7, 12, 5, 107, "Glamour"]
Output: [3,5,7,12]
#This pipe takes an array as input, and returns an array with last n values deleted. 3 is an optional drop parameter. Default is 1.
Input: [3, [5, 7], [12, [[5], [107, "Glamour"]]]]
Output: [3,5,7,12,[5],[107,"Glamour"]]
#This pipe takes an array as input, and returns an array after flattening it to given layers. 2 is an optional layer parameter. Default is 1.
Input: 450009856
Output: 439462.75 KB
#'KB' is an Optional Message. Other permissible values are 'B'(Bytes), 'KB'(KiloBytes), 'MB'(MegaBytes), 'GB'(GigaBytes) and 'TB'(TeraBytes).
Input: 45
Output: 101101
Input: 1001
Output: 11
Input: 45
Output: 2d
Input: 10
Output: 8
#This pipe converts input number/string from one base to another. First parameter is the base of input. Second parameter is the base of output. These bases could be either a number or 'binary' or 'octal' or 'decimal' or 'hexadecimal'[See Example].
Input: 450090856.64848939302323245245523232
Output: Four Hundred Fifty Million Ninety Thousand Eight Hundred Fifty Six point Six Four Eight Four Eight Nine Four
Input: 450090856
Output: Four Hundred Fifty Million Ninety Thousand Eight Hundred Fifty Six
Input: 450009856
Output: Forty Five Crore Nine Thousand Eight Hundred Fifty Six
#This pipe returns the calculated word value upto 21 digits and rounded 7 digits after decimal. 'USA' or 'IND' is optional number system. Default is 'USA'.</div>
Input: 99.45
Output: 100
#This pipe returns the next integer to provided value.
Input: 99.45
Output: 99
#This pipe returns the previous integer to provided value.
Input: 45a
Output: Not a Number
#'Not a Number' is an Optional Message. Default is 'Invalid Number'.
Input: 44.555
Output: 44.6
#This pipe returns the rounded value to provided value upto given decimal digits. 1 is optional number of digits post decimal. Default is 0.
Input: 3.147
Output: 180.30981812767004
#This pipe converts radians into degrees.
Input: 720
Output: 4π
#This pipe converts degrees into radians.
Input: 90
Output: 729000
#This pipe returns the calculated power value. 3 is optional exponent. Default is 0.
Input: 1024
Output: 32
#This pipe returns the square root of provided value.
Input: -20
Output: 20
#This pipe returns the absolute value of provided value.
Input: -20
Output: NEGATIVE
Input: 0
Output: NIL
Input: 20
Output: POSITIVE
#This pipe returns the nature of provided value.
Input: 25
Output: 25th
Input: 33
Output: 33rd
#This pipe returns the ordinal value of provided value.
Input: ['45', 97]
Output: true
Input: 45a
Output: false
#Returns a boolean showing if input is Array or not.
Input: ['45', 97]
Output: false
Input: 11000110
Output: true
#Returns a boolean showing if input is Binary or not.
Input: ['45', 97]
Output: true
Input: null
Output: false
#Returns a boolean showing if input is Defined or not.
Input: ['45', 97]
Output: false
Input: 10
Output: true
#Returns a boolean showing if input is Equal to given data or not[Datatype ignored].
Input: ['45', 97]
Output: false
Input: filterFunction
Output: true
#Returns a boolean showing if input is Function or not.
Input: 125
Output: false
Input: '125'
Output: true
#Returns a boolean showing if input is strictly Equal to given data or not.
Input: 125
Output: false
Input: 0
Output: true
#Returns a boolean showing if input is Zero or not.
Input: 125
Output: false
Input: null
Output: true
#Returns a boolean showing if input is null or not.
Input: 125
Output: true
Input: '125'
Output: true
Input: '125a'
Output: false
#Returns a boolean showing if input is a number or not.
Input: 125
Output: false
Input: {name: 'Adam', prof: 'Teacher'}
Output: true
#Returns a boolean showing if input is an object or not.
Input: 125
Output: false
Input: '125'
Output: true
#Returns a boolean showing if input is string or not.
Input: true
Output: true
Input: '125'
Output: false
#Returns a boolean showing if input is true or not.
Input: undefined
Output: true
Input: '125'
Output: false
#Returns a boolean showing if input is undefined or not.
Input: ['45', 97]
Output: ["0","1"]
Input: {name: 'Adam', prof: 'Teacher'}
Output: ["name","prof"]
#Returns an Array of all the indexes of given Object/Array.
Input: ['45', 97]
Output: ["45",97]
Input: {name: 'Adam', prof: 'Teacher'}
Output: ["Adam","Teacher"]
#Returns an Array of all the values of given Object/Array.
Input: [ {name: 'Adam', prof: 'Engineer'}, {name: 'Brian', prof: 'Teacher', age: 25}, {name: 'Chloe', age: 30} ]
Output: [{"name":"Adam","prof":"Engineer","age":24},{"name":"Brian","prof":"Teacher","age":25},{"name":"Chloe","age":30,"prof":"Programmer"}]
#Returns an Array with added default properties of given Object/Array.
Input: {name: 'Adam', prof: 'Teacher'}
Output: {"name":"Adam","prof":"Teacher"} - WITH STRINGIFY
Output: [object Object] - WITHOUT STRINGIFY
#Returns an Renderable template Object.
No vulnerabilities found.
No security vulnerabilities found.